Function at 0x402f80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x588e70]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 1
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, ecx
push 0
mov dword [ebp - 0x90], esi
mov dword [esi + 0x5c], 0
push 0
jne 0x402fb6
push 4
jmp 0x402fb8
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x8c]
push eax
push 0x40
lea ecx, [ebp - 0x88]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esi + 4]
mov ecx, 0x10
lea esi, [ebp - 0x88]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov edx, dword [0x53d210]
mov ecx, dword [0x53d214]
mov dword [ebp - 0x44], edx
movzx edx, byte [0x53d218]
mov dword [ebp - 0x40], ecx
mov ecx, dword [0x53d204]
mov dword [ebp - 0x3b], ecx
movzx ecx, byte [0x53d20c]
mov byte [ebp - 0x3c], dl
mov edx, dword [0x53d208]
mov dword [ebp - 0x37], edx
mov edx, dword [0x53d1f8]
mov byte [ebp - 0x33], cl
mov ecx, dword [0x53d1fc]
mov dword [ebp - 0x32], edx
movzx edx, byte [0x53d200]
mov dword [ebp - 0x2e], ecx
mov ecx, dword [0x53d1ec]
mov dword [ebp - 0x29], ecx
movzx ecx, byte [0x53d1f4]
mov byte [ebp - 0x2a], dl
mov edx, dword [0x53d1f0]
mov dword [ebp - 0x25], edx
mov edx, dword [0x53d1e0]
mov byte [ebp - 0x21], cl
mov ecx, dword [0x53d1e4]
mov dword [ebp - 0x20], edx
movzx edx, byte [0x53d1e8]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [0x53d1d4]
mov dword [ebp - 0x17], ecx
movzx ecx, byte [0x53d1dc]
mov byte [ebp - 0x18], dl
mov edx, dword [0x53d1d8]
mov dword [ebp - 0x13], edx
mov edx, dword [0x53d1c8]
mov byte [ebp - 0xf], cl
mov ecx, dword [0x53d1cc]
mov dword [ebp - 0xe], edx
movzx edx, byte [0x53d1d0]
mov dword [ebp - 0xa], ecx
lea ecx, [ebp - 0x44]
xor esi, esi
mov byte [ebp - 6], dl
sub ecx, eax
jmp 0x4030c0
mov eax, dword [ebp - 0x90]
mov edx, 8
add eax, 4
cmp edx, 4
jb 0x4030ea
mov edi, dword [ecx + eax]
cmp edi, dword [eax]
jne 0x4030df
sub edx, 4
jmp 0x4030cb
inc esi
add ecx, 9
cmp esi, 7
jl 0x4030c0
jmp 0x4030f3
cmp esi, 7
jl 0x403296
mov dword [ebp - 0x94], 0
mov esi, 0x53d0fc
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0x3800
push ebx
call edi
push 0
lea eax, [ebp - 0x8c]
push eax
push 8
lea ecx, [ebp - 0x88]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x88]
cmp edx, dword [esi - 4]
jne 0x40314d
mov al, byte [esi]
cmp al, byte [ebp - 0x84]
jne 0x40314d
mov cl, byte [esi + 1]
cmp cl, byte [ebp - 0x83]
je 0x403166
inc dword [ebp - 0x94]
add esi, 7
cmp esi, vtable.CDeviceFlash.0
jl 0x403102
mov esi, dword [ebp - 0x90]
jmp 0x403176
mov edx, dword [ebp - 0x94]
mov esi, dword [ebp - 0x90]
inc edx
mov dword [esi + 0x5c], edx
cmp dword [esi + 0x5c], 0
jne 0x4031c1
cmp dword [ebp + 0xc], 1
push 0
push 0
jne 0x40318d
push 0x3004
jmp 0x403192
push 0x3000
push ebx
call edi
push 0
lea eax, [ebp - 0x8c]
push eax
push 4
lea ecx, [ebp - 0x88]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x88], 0x3931544d
jne 0x4031c1
mov dword [esi + 0x5c], 4
mov eax, dword [esi + 0x5c]
dec eax
cmp eax, 0xb
ja case.default.0x4031ce
jmp dword [eax*4 + 0x403338]
push 0
push 0
push 0xe7060
jmp 0x40322a
push 0
push 0
push 0x1e7060
jmp 0x40322a
cmp dword [ebp + 0xc], 1
push 0
push 0
jne 0x4031fc
push 0x1ebff8
jmp 0x40322a
push 0x1ebff4
jmp 0x40322a
test byte [ebp - 0x82], 0x10
push 0
push 0
jne 0x4031d9
push 0xf9060
push ebx
call edi
mov dword [esi + 0x60], 1
jmp 0x40322d
push 0
push 0
push 0xee060
push ebx
call edi
push 0
lea edx, [ebp - 0x8c]
push edx
push 0x40
lea eax, [ebp - 0x88]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x40
push 0
lea edi, [esi + 4]
push edi
call fcn.005144f0
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x78]
mov eax, dword [ebp - 0x74]
mov dword [edi], ecx
mov ecx, dword [ebp - 0x70]
mov dword [esi + 0xe], eax
mov eax, dword [ebp - 0x68]
mov dword [esi + 0x12], ecx
mov ecx, dword [ebp - 0x64]
mov dword [edi + 4], edx
mov edx, dword [ebp - 0x6c]
mov dword [esi + 0x16], edx
add esp, 0xc
mov dword [esi + 0x1a], eax
mov dword [esi + 0x20], ecx
jmp 0x40329c
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005144d7
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp - 0x90]
mov eax, dword [esi + 0x44]
test eax, eax
je 0x4032b3
push eax
call fcn.00514d15
add esp, 4
mov dword [esi + 0x44], 0
cmp dword [esi + 0x5c], 0
mov ecx, esi
jne 0x4032c3
push ebx
call fcn.00402c70
jmp 0x4032d2
mov edx, dword [ebp + 0xc]
movzx eax, byte [esi + 0x5c]
push edx
push eax
push ebx
call fcn.00402d80
mov edi, eax
test edi, edi
je 0x40330a
lea eax, [esi + 0xe]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4032e0
sub eax, edx
dec eax
mov dword [ebp - 0x8c], eax
je 0x403321
cmp byte [esi + eax + 0xe], 0x20
jne 0x403321
mov byte [esi + eax + 0xe], 0
mov eax, dword [ebp - 0x8c]
test eax, eax
jne 0x4032f2
jmp 0x403321
cmp dword [esi + 0x44], 0
jne 0x403321
push 0
call fcn.00514d15
add esp, 4
mov dword [esi + 0x44], 0
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005144d7
mov esp, ebp
pop ebp
ret 8