Function at 0x5802e0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d208e
mov eax, dword fs:[0]
push eax
sub esp, 0x2ac
mov eax, dword [0x70c0f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x224], ecx
push 0x58
push 0
lea eax, [ebp - 0x2b8]
push eax
call fcn.004e1330
add esp, 0xc
mov dword [ebp - 0x2b8], 0x58
mov ecx, dword [ebp - 0x224]
mov ecx, dword [ecx + 0x510]
call fcn.0049eff4
mov dword [ebp - 0x2b4], eax
lea edx, [ebp - 0x218]
mov dword [ebp - 0x29c], edx
mov eax, 2
imul ecx, eax, 0
xor edx, edx
mov eax, dword [ebp - 0x29c]
mov word [eax + ecx], dx
mov dword [ebp - 0x298], 0x208
mov dword [ebp - 0x2ac], 0x6878b0
mov dword [ebp - 0x2a0], 1
mov dword [ebp - 0x294], 0
mov dword [ebp - 0x290], 0
mov dword [ebp - 0x28c], 0
mov dword [ebp - 0x284], 0x1800
mov ecx, dword [ebp - 0x224]
mov ecx, dword [ecx + 0x40]
call fcn.0049eff4
push eax
lea ecx, [ebp - 0x238]
call fcn.00496ebd
mov dword [ebp - 4], 0
lea edx, [ebp - 0x2b8]
push edx
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
test eax, eax
je 0x5806fa
push 0
push 0x80
push 4
push 0
push 1
push SysReAllocStringLen
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0xffffffff
je 0x5806fa
push 0
mov ecx, dword [ebp - 0x234]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x220], eax
mov eax, dword [ebp - 0x220]
add eax, 2
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00495ecb
add esp, 4
mov dword [ebp - 0x240], eax
mov eax, dword [ebp - 0x240]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
jne 0x58047c
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x238]
call fcn.00496f3b
jmp 0x58070c
mov ecx, dword [ebp - 0x220]
add ecx, 2
push ecx
push 0
mov edx, dword [ebp - 0x21c]
push edx
call fcn.004e1330
add esp, 0xc
push 0
lea eax, [ebp - 0x260]
push eax
mov ecx, dword [ebp - 0x220]
push ecx
mov edx, dword [ebp - 0x21c]
push edx
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x230], ecx
mov edx, dword [ebp - 0x230]
movzx eax, word [edx]
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0xfeff
jne 0x5804f6
mov ecx, dword [ebp - 0x21c]
add ecx, 2
mov dword [ebp - 0x230], ecx
jmp 0x580693
cmp dword [ebp - 0x23c], 0xbbef
jne 0x5805cf
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x248], edx
mov eax, dword [ebp - 0x220]
add eax, 2
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00495ecb
add esp, 4
mov dword [ebp - 0x244], eax
mov eax, dword [ebp - 0x244]
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0
jne 0x580566
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x238]
call fcn.00496f3b
jmp 0x58070c
mov ecx, dword [ebp - 0x220]
add ecx, 2
push ecx
push 0
mov edx, dword [ebp - 0x228]
push edx
call fcn.004e1330
add esp, 0xc
mov eax, dword [ebp - 0x228]
push eax
mov ecx, dword [ebp - 0x248]
push ecx
call fcn.004db74d
add esp, 8
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x24c], edx
mov eax, dword [ebp - 0x24c]
push eax
call fcn.00495c1d
add esp, 4
mov ecx, dword [ebp - 0x228]
mov dword [ebp - 0x21c], ecx
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x230], edx
jmp 0x580693
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x220]
add eax, 2
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00495ecb
add esp, 4
mov dword [ebp - 0x250], eax
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0
jne 0x58062f
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x238]
call fcn.00496f3b
jmp 0x58070c
mov ecx, dword [ebp - 0x220]
add ecx, 2
push ecx
push 0
mov edx, dword [ebp - 0x22c]
push edx
call fcn.004e1330
add esp, 0xc
mov eax, dword [ebp - 0x22c]
push eax
mov ecx, dword [ebp - 0x254]
push ecx
call fcn.004d83a1
add esp, 8
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x258], edx
mov eax, dword [ebp - 0x258]
push eax
call fcn.00495c1d
add esp, 4
mov ecx, dword [ebp - 0x22c]
mov dword [ebp - 0x21c], ecx
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x230], edx
mov eax, dword [ebp - 0x224]
cmp dword [eax + 0x518], 0
je 0x5806c8
mov ecx, dword [ebp - 0x21c]
push ecx
mov edx, dword [ebp - 0x224]
mov eax, dword [edx + 0x518]
mov ecx, dword [ebp - 0x224]
mov edx, dword [eax]
mov ecx, dword [ecx + 0x518]
mov eax, dword [edx + 0x3c]
call eax
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x25c], ecx
mov edx, dword [ebp - 0x25c]
push edx
call fcn.00495c1d
add esp, 4
mov dword [ebp - 0x21c], 0
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x238]
call fcn.00496f3b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00495c0c
mov esp, ebp
pop ebp
ret