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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x455906
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x470050]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov ebx, ecx
push 0x1c
call fcn.0042c71f
mov esi, eax
add esp, 4
mov dword [esp + 0x28], esi
xor edi, edi
mov dword [esp + 0x40], edi
cmp esi, edi
je 0x40591f
xor eax, eax
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], edi
mov word [esi + 4], ax
mov eax, ebx
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x405900
sub eax, edx
sar eax, 1
push eax
mov eax, ebx
call fcn.00402da0
mov ebx, esi
mov dword [esp + 0x14], ebx
jmp 0x405925
mov dword [esp + 0x14], edi
mov ebx, edi
mov dword [esp + 0x40], 0xffffffff
mov edx, dword [ebx + 0x18]
cmp edx, 8
jb 0x40593a
mov esi, dword [ebx + 4]
jmp 0x40593d
lea esi, [ebx + 4]
cmp esi, edi
je 0x405964
lea eax, [ebx + 4]
cmp edx, 8
jb 0x40594d
mov ecx, dword [eax]
jmp 0x40594f
mov ecx, eax
cmp ecx, esi
ja 0x405964
cmp edx, 8
jb 0x40595a
mov eax, dword [eax]
mov ecx, dword [ebx + 0x14]
lea edx, [eax + ecx*2]
cmp esi, edx
jbe 0x405969
call fcn.0042c4d4
mov dword [esp + 0x30], esi
lea ecx, [ecx]
mov edx, dword [ebx + 0x18]
lea esi, [ebx + 4]
cmp edx, 8
jb 0x40597f
mov edi, dword [esi]
jmp 0x405981
mov edi, esi
mov eax, dword [ebx + 0x14]
add eax, eax
add edi, eax
je 0x4059aa
cmp edx, 8
jb 0x405993
mov ecx, dword [esi]
jmp 0x405995
mov ecx, esi
cmp ecx, edi
ja 0x4059aa
cmp edx, 8
jb 0x4059a2
mov ecx, dword [esi]
jmp 0x4059a4
mov ecx, esi
add ecx, eax
cmp edi, ecx
jbe 0x4059af
call fcn.0042c4d4
mov ecx, dword [esp + 0x30]
cmp ecx, edi
je 0x405a3d
cmp ebx, 0xfffffffc
je 0x4059df
cmp dword [ebx + 0x18], 8
jb 0x4059ca
mov eax, dword [esi]
jmp 0x4059cc
mov eax, esi
mov edx, dword [ebx + 0x14]
lea eax, [eax + edx*2]
cmp ecx, eax
jb 0x4059df
call fcn.0042c4d4
mov ecx, dword [esp + 0x30]
cmp word [ecx], 0x2f
jne 0x405a11
cmp ebx, 0xfffffffc
je 0x405a09
cmp dword [ebx + 0x18], 8
jb 0x4059f4
mov eax, dword [esi]
jmp 0x4059f6
mov eax, esi
mov edx, dword [ebx + 0x14]
lea eax, [eax + edx*2]
cmp ecx, eax
jb 0x405a09
call fcn.0042c4d4
mov ecx, dword [esp + 0x30]
mov edx, 0x5c
mov word [ecx], dx
cmp ebx, 0xfffffffc
je 0x405a31
cmp dword [ebx + 0x18], 8
jb 0x405a1e
mov esi, dword [esi]
mov eax, dword [ebx + 0x14]
lea edx, [esi + eax*2]
cmp ecx, edx
jb 0x405a31
call fcn.0042c4d4
mov ecx, dword [esp + 0x30]
add ecx, 2
mov dword [esp + 0x30], ecx
jmp 0x405970
mov eax, dword [ebx + 0x14]
lea edi, [eax - 1]
cmp edi, eax
jbe 0x405a4c
call fcn.0042c4d4
cmp dword [ebx + 0x18], 8
jb 0x405a54
mov esi, dword [esi]
cmp word [esi + edi*2], 0x5c
je 0x405a69
push 1
mov eax, 0x45bc38
mov ecx, ebx
call fcn.004067a0
push 0x1c
call fcn.0042c71f
mov esi, eax
add esp, 4
mov dword [esp + 0x28], esi
xor eax, eax
mov dword [esp + 0x40], 1
cmp esi, eax
je 0x405abf
mov edx, dword [ebp + 8]
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], 7
mov word [esi + 4], ax
mov eax, edx
lea edi, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405aa0
sub eax, edi
sar eax, 1
push eax
mov eax, edx
call fcn.00402da0
mov edi, esi
mov dword [esp + 0x1c], edi
jmp 0x405ac5
mov dword [esp + 0x1c], eax
mov edi, eax
mov dword [esp + 0x40], 0xffffffff
cmp dword [edi + 0x18], 8
jb 0x405ad8
mov eax, dword [edi + 4]
jmp 0x405adb
lea eax, [edi + 4]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x24], esi
cmp esi, 0xffffffff
je 0x405c44
lea ecx, [esp + 0x28]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x405baf
cmp dword [esp + 0x28], 0
jne 0x405baf
lea esi, [edi + 1]
and esi, 0xfffffffe
push esi
call fcn.0042c1de
add esp, 4
push esi
push 0
push eax
mov dword [esp + 0x24], eax
call fcn.0042e060
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
add esp, 0xc
push 0
lea edx, [esp + 0x30]
push edx
push edi
push eax
push ecx
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405b9e
mov eax, dword [esp + 0x18]
xor ebx, ebx
cmp edi, 3
jbe 0x405bc1
mov edx, 0xfeff
cmp word [eax], dx
jne 0x405bc1
shr esi, 1
add eax, 2
dec esi
mov ecx, dword [esp + 0x14]
push ecx
push esi
push eax
call fcn.00406c70
add esp, 0xc
test ebx, ebx
je 0x405b9a
push ebx
call fcn.0042cd84
add esp, 4
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push edx
call fcn.0042cd84
mov esi, dword [esp + 0x28]
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x1c]
push 0
jmp 0x405c54
push 0
push 0
push edi
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
test esi, esi
jle 0x405c1d
xor ecx, ecx
lea eax, [esi + 0x200]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0042c1de
add esp, 4
push esi
mov ebx, eax
mov eax, dword [esp + 0x1c]
push ebx
push edi
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x405c39
push ebx
call fcn.0042cd84
add esp, 4
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push ecx
push esi
push edx
call fcn.00406e70
add esp, 0xc
jmp 0x405b9a
mov eax, ebx
test ebx, ebx
je 0x405c21
jmp 0x405b7e
push 1
mov ecx, edi
call fcn.004054b0
add esp, 4
push 1
mov ecx, ebx
call fcn.004054b0
add esp, 4
cmp dword [ebx + 0x18], 8
jb 0x405c6e
mov eax, dword [ebx + 4]
push eax
call fcn.0042c62b
add esp, 4
xor ecx, ecx
mov dword [ebx + 0x18], 7
mov dword [ebx + 0x14], 0
push ebx
mov word [ebx + 4], cx
call fcn.0042c62b
add esp, 4
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret