Function at 0x402e90
Capabilities:
Encode data using xor
Get file size
Hash data with crc32
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [edi + 0x24]
push ebx
push esi
push 0
push eax
mov ebx, 0x10
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0xffffffff
mov dword [ebp - 0x10], ebx
lea esp, [esp]
movzx edx, word [edi + 0x18]
mov eax, dword [edi + 0x1c]
push 0
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [edi + 0x24]
push edx
add eax, 8
push eax
push ecx
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 8]
test edx, edx
je 0x402f17
mov ecx, dword [edi + 0x1c]
mov eax, dword [ebp - 0xc]
add ecx, 8
mov dword [ebp - 0xc], edx
movzx esi, byte [ecx]
movzx ebx, al
xor esi, ebx
shr eax, 8
xor eax, dword [esi*4 + 0x413fc8]
inc ecx
dec dword [ebp - 0xc]
jne 0x402ef6
mov ebx, dword [ebp - 0x10]
sub dword [ebp - 0x14], edx
mov dword [ebp - 0xc], eax
movzx esi, word [edi + 0x18]
mov dword [ebp - 0x18], esi
cmp edx, esi
jae 0x40300a
test ebx, ebx
je 0x40300a
cmp ebx, 0x10
jne 0x402fc8
mov eax, dword [ebp - 0xc]
lea ecx, [edi + 2]
mov ebx, 2
movzx edx, byte [ecx - 2]
movzx esi, al
xor edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x413fc8]
movzx edx, byte [ecx - 1]
movzx esi, al
xor edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x413fc8]
movzx edx, byte [ecx]
movzx esi, al
xor edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x413fc8]
movzx edx, byte [ecx + 1]
movzx esi, al
xor edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x413fc8]
movzx edx, byte [ecx + 2]
movzx esi, al
xor edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x413fc8]
movzx edx, byte [ecx + 3]
movzx esi, al
xor edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x413fc8]
add ecx, 6
dec ebx
jne 0x402f42
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov dword [edi + 0xc], eax
sub esi, edx
cmp esi, ebx
jb 0x402fd0
mov esi, ebx
mov ecx, dword [edi + 0x1c]
mov eax, edi
sub eax, ebx
push esi
add eax, 0x10
push eax
lea edx, [ecx + edx + 8]
push edx
call fcn.0040bc80
mov eax, dword [ebp - 8]
add eax, esi
mov dword [ebp - 8], eax
movsx eax, al
add esp, 0xc
push eax
sub ebx, esi
push str.WinDFU::UploadData:_EOF__cbRead:__d
mov dword [ebp - 0x10], ebx
call fcn.00403900
mov edx, dword [ebp - 8]
add esp, 8
test edx, edx
je 0x403192
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x2c]
push ecx
push eax
lea ebx, [edi + 0x20]
push edi
mov esi, edx
call fcn.00402e10
test eax, eax
jne 0x403117
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
sub eax, dword [ebp - 0x14]
xor edx, edx
imul eax, eax, 0x64
div ecx
mov ebx, eax
cmp ebx, dword [0x4143c8]
je 0x4030bf
mov eax, dword [edi + 0x10]
test eax, eax
je 0x403088
cmp eax, 1
jne 0x4030b9
mov esi, dword [edi + 0x14]
mov eax, dword [esi + 0x10]
push ebx
push eax
push str.operation__d_progress__d
mov dword [ebp - 0x18], eax
call fcn.00403900
mov eax, dword [esi + 8]
add esp, 0xc
test eax, eax
je 0x403080
mov ecx, dword [esi + 0xc]
mov edx, dword [ebp - 0x18]
push ecx
push ebx
push edx
push esi
call eax
add esp, 0x10
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x10], eax
jmp 0x4030b6
mov esi, dword [edi + 0x14]
push ebx
push 0
push str.operation__d_progress__d
call fcn.00403900
mov eax, dword [esi + 8]
add esp, 0xc
test eax, eax
je 0x4030af
mov ecx, dword [esi + 0xc]
push ecx
push ebx
push 0
push esi
call eax
add esp, 0x10
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], ebx
mov dword [0x4143c8], ebx
mov ebx, 0xa
mov edx, dword [edi + 0x2c]
push edx
lea esi, [ebp - 0x24]
dec ebx
call fcn.00402ae0
test eax, eax
jne 0x403133
cmp byte [ebp - 0x24], al
jne 0x40314f
mov al, byte [ebp - 0x20]
cmp al, 4
jne 0x403103
movzx eax, byte [ebp - 0x21]
movzx ecx, byte [ebp - 0x22]
movzx edx, byte [ebp - 0x23]
shl eax, 8
add eax, ecx
shl eax, 8
add eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, byte [ebp - 0x20]
jmp 0x403107
cmp al, 5
je 0x40310f
test ebx, ebx
jne 0x4030c4
cmp al, 5
jne 0x403175
mov ebx, dword [ebp - 0x10]
jmp 0x402ec0
movsx eax, al
push eax
push str.WinDFU::UploadData:_UploadDataPacket_failed__error__d
call fcn.00403900
add esp, 8
mov eax, 0xffffffef
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsx ecx, al
push ecx
push str.WinDFU::UploadData:_GetStatus_failed_1__error:__d
call fcn.00403900
add esp, 8
mov eax, 0xfffffffa
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x2c]
push edx
call fcn.00402de0
movsx eax, byte [ebp - 0x24]
push eax
push str.WinDFU::UploadData:_GetStatus_failed_2__status:__d
call fcn.00403900
add esp, 8
mov eax, 0xfffffff9
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsx ecx, byte [ebp - 1]
push ecx
push str.WinDFU::UploadData:_GetStatus_failed__DFUERROR_TIMEOUT_GET_STATUS
call fcn.00403900
add esp, 8
mov eax, 0xfffffff4
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.WinDFU::UploadData:_ZLP
call fcn.00403900
add esp, 4
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret