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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d4146
mov eax, dword fs:[0]
push eax
sub esp, 0x2d0
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 - 0x2dc]
push eax
call fcn.004e1330
add esp, 0xc
mov dword [ebp - 0x2dc], 0x58
mov ecx, dword [ebp - 0x224]
mov edx, dword [ecx + 0x664]
mov dword [ebp - 0x2d8], edx
lea eax, [ebp - 0x218]
mov dword [ebp - 0x2c0], eax
mov ecx, 2
imul edx, ecx, 0
xor eax, eax
mov ecx, dword [ebp - 0x2c0]
mov word [ecx + edx], ax
mov dword [ebp - 0x2bc], 0x208
mov dword [ebp - 0x2d0], 0x6ba500
mov dword [ebp - 0x2c4], 1
mov dword [ebp - 0x2b8], 0
mov dword [ebp - 0x2b4], 0
mov dword [ebp - 0x2b0], 0
mov dword [ebp - 0x2a8], 0x1800
mov edx, dword [ebp - 0x224]
mov ecx, dword [edx + 0x40]
call fcn.0049eff4
push eax
lea ecx, [ebp - 0x230]
call fcn.00496ebd
mov dword [ebp - 4], 0
lea eax, [ebp - 0x2dc]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
test eax, eax
je 0x59b8df
push 0
push 0x80
push 4
push 0
push 1
push SysReAllocStringLen
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0xffffffff
je 0x59b8df
push 0
mov edx, dword [ebp - 0x23c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp - 0x22c]
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 - 0x24c], eax
mov eax, dword [ebp - 0x24c]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
jne 0x59b4b7
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x230]
call fcn.00496f3b
jmp 0x59b94f
mov ecx, dword [ebp - 0x22c]
add ecx, 2
push ecx
push 0
mov edx, dword [ebp - 0x21c]
push edx
call fcn.004e1330
add esp, 0xc
mov byte [ebp - 0x21d], 0
mov byte [ebp - 0x21e], 0
push 0
lea eax, [ebp - 0x244]
push eax
mov ecx, dword [ebp - 0x22c]
push ecx
mov edx, dword [ebp - 0x21c]
push edx
mov eax, dword [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x228], 0
mov ecx, dword [ebp - 0x244]
push ecx
mov edx, dword [ebp - 0x21c]
push edx
call fcn.004d913c
add esp, 8
mov dword [ebp - 0x250], eax
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x240], eax
cmp dword [ebp - 0x240], 4
ja case.default.0x59b549
mov ecx, dword [ebp - 0x240]
jmp dword [ecx*4 + 0x59b968]
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x25c], edx
mov eax, dword [ebp - 0x22c]
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 - 0x254], eax
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0
jne 0x59b5de
cmp dword [ebp - 0x21c], 0
je 0x59b5c7
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x258], ecx
mov edx, dword [ebp - 0x258]
push edx
call fcn.00495c1d
add esp, 4
mov dword [ebp - 0x21c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x230]
call fcn.00496f3b
jmp 0x59b94f
mov eax, dword [ebp - 0x22c]
add eax, 2
push eax
push 0
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.004e1330
add esp, 0xc
mov edx, dword [ebp - 0x234]
push edx
mov eax, dword [ebp - 0x25c]
push eax
call fcn.004d83a1
add esp, 8
cmp dword [ebp - 0x21c], 0
je 0x59b63d
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x260], ecx
mov edx, dword [ebp - 0x260]
push edx
call fcn.00495c1d
add esp, 4
mov dword [ebp - 0x21c], 0
mov eax, dword [ebp - 0x234]
mov dword [ebp - 0x228], eax
mov byte [ebp - 0x21d], 0
mov byte [ebp - 0x21e], 1
jmp 0x59b82b
mov ecx, dword [ebp - 0x21c]
add ecx, 2
mov dword [ebp - 0x264], ecx
mov edx, dword [ebp - 0x264]
mov dword [ebp - 0x228], edx
mov byte [ebp - 0x21d], 1
mov byte [ebp - 0x21e], 0
jmp 0x59b82b
mov eax, dword [ebp - 0x21c]
add eax, 2
mov dword [ebp - 0x248], eax
mov ecx, dword [ebp - 0x248]
mov dword [ebp - 0x268], ecx
mov edx, dword [ebp - 0x244]
sub edx, 2
push edx
mov eax, dword [ebp - 0x248]
push eax
call fcn.004db40a
add esp, 8
mov ecx, dword [ebp - 0x268]
mov dword [ebp - 0x228], ecx
mov byte [ebp - 0x21d], 1
mov byte [ebp - 0x21e], 0
jmp 0x59b82b
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x274], edx
mov eax, dword [ebp - 0x22c]
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 - 0x26c], eax
mov eax, dword [ebp - 0x26c]
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0
jne 0x59b76b
cmp dword [ebp - 0x21c], 0
je 0x59b754
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x270], ecx
mov edx, dword [ebp - 0x270]
push edx
call fcn.00495c1d
add esp, 4
mov dword [ebp - 0x21c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x230]
call fcn.00496f3b
jmp 0x59b94f
mov eax, dword [ebp - 0x22c]
add eax, 2
push eax
push 0
mov ecx, dword [ebp - 0x238]
push ecx
call fcn.004e1330
add esp, 0xc
mov edx, dword [ebp - 0x238]
push edx
mov eax, dword [ebp - 0x274]
push eax
call fcn.004db74d
add esp, 8
cmp dword [ebp - 0x21c], 0
je 0x59b7ca
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x278], ecx
mov edx, dword [ebp - 0x278]
push edx
call fcn.00495c1d
add esp, 4
mov dword [ebp - 0x21c], 0
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x228], eax
mov byte [ebp - 0x21d], 0
mov byte [ebp - 0x21e], 1
jmp 0x59b82b
cmp dword [ebp - 0x21c], 0
je 0x59b814
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x27c], ecx
mov edx, dword [ebp - 0x27c]
push edx
call fcn.00495c1d
add esp, 4
mov dword [ebp - 0x21c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x230]
call fcn.00496f3b
jmp 0x59b94f
mov eax, dword [ebp - 0x224]
cmp dword [eax + 0x668], 0
je 0x59b860
mov ecx, dword [ebp - 0x228]
push ecx
mov edx, dword [ebp - 0x224]
mov eax, dword [edx + 0x668]
mov ecx, dword [ebp - 0x224]
mov edx, dword [eax]
mov ecx, dword [ecx + 0x668]
mov eax, dword [edx + 0x3c]
call eax
movzx ecx, byte [ebp - 0x21d]
test ecx, ecx
je 0x59b899
cmp dword [ebp - 0x21c], 0
je 0x59b899
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x280], edx
mov eax, dword [ebp - 0x280]
push eax
call fcn.00495c1d
add esp, 4
mov dword [ebp - 0x21c], 0
movzx ecx, byte [ebp - 0x21e]
test ecx, ecx
je 0x59b8d2
cmp dword [ebp - 0x228], 0
je 0x59b8d2
mov edx, dword [ebp - 0x228]
mov dword [ebp - 0x284], edx
mov eax, dword [ebp - 0x284]
push eax
call fcn.00495c1d
add esp, 4
mov dword [ebp - 0x228], 0
mov ecx, dword [ebp - 0x23c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x224]
mov ecx, dword [edx + 0x670]
call fcn.004a35bd
movzx eax, al
test eax, eax
je 0x59b91b
mov ecx, dword [ebp - 0x224]
cmp dword [ecx + 0x668], 0
je 0x59b919
push 1
mov edx, dword [ebp - 0x224]
mov ecx, dword [edx + 0x668]
call fcn.004bbf6b
jmp 0x59b93d
mov eax, dword [ebp - 0x224]
cmp dword [eax + 0x668], 0
je 0x59b93d
push 0
mov ecx, dword [ebp - 0x224]
mov ecx, dword [ecx + 0x668]
call fcn.004bbf6b
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x230]
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