Function at 0x59c450
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x697e1b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
mov eax, dword [esp + 0x48]
push ebx
mov ebx, dword [esp + 0x48]
push ebp
push esi
push edi
mov edi, ecx
mov edx, ebx
lea ecx, [eax + ebx*2]
add edx, ecx
shl edx, 4
mov ebp, dword [edx + edi + 0x40dc]
lea eax, [edx + edi]
mov dword [esp + 0x54], eax
mov esi, dword [ebp]
cmp esi, ebp
je 0x59c4dc
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x59c4a3
mov eax, dword [ecx]
push 1
call dword [eax + 4]
mov eax, dword [esi + 8]
mov ecx, dword [0x817108]
cmp eax, ecx
je 0x59c4bb
push eax
call fcn.0059fe10
add esp, 4
jmp 0x59c4d2
mov eax, dword [esi + 4]
cmp esi, dword [eax + 8]
jne 0x59c4cd
mov esi, eax
mov eax, dword [eax + 4]
cmp esi, dword [eax + 8]
je 0x59c4c3
cmp dword [esi + 8], eax
je 0x59c4d4
mov esi, eax
cmp esi, ebp
jne 0x59c495
mov eax, dword [esp + 0x54]
lea ebp, [eax + 0x40d8]
mov eax, dword [eax + 0x40dc]
push eax
mov ecx, dword [eax]
push ecx
lea ecx, [esp + 0x5c]
push ecx
mov ecx, ebp
call fcn.0059f440
mov edx, dword [edi + 0x40d0]
mov eax, dword [edi + 0x40d4]
mov ecx, dword [esp + 0x58]
lea ebx, [edx + ebx - 1]
lea ecx, [eax + ecx - 1]
mov dword [esp + 0x18], ebx
test ebx, ebx
mov dword [esp + 0x20], ecx
jl 0x59c6fd
mov eax, dword [edi + 0x40c8]
cmp ebx, eax
jge 0x59c6fd
test ecx, ecx
jl 0x59c6fd
cmp ecx, eax
jge 0x59c6fd
imul eax, ecx
mov edx, dword [esp + 0x60]
add eax, ebx
mov eax, dword [edx + eax*4]
test eax, eax
jle 0x59c6fd
mov edi, dword [esp + 0x5c]
push 0
push 0
push eax
push edi
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov esi, dword [sym.imp.kernel32.dll_ReadFile]
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x1c]
push 4
push ecx
push edi
call esi
mov eax, dword [esp + 0x14]
mov dword [esp + 0x60], 0
test eax, eax
jle 0x59c6fd
jmp 0x59c59d
mov esi, dword [sym.imp.kernel32.dll_ReadFile]
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x5c]
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x24]
push 4
push eax
push edi
call esi
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x2c]
push 4
push edx
push edi
call esi
push 0x50
call fcn.00673b05
add esp, 4
mov dword [esp + 0x58], eax
xor esi, esi
cmp eax, esi
mov dword [esp + 0x4c], esi
je 0x59c5e0
mov ecx, eax
call fcn.0043e880
mov esi, eax
mov eax, dword [esi]
push edi
mov ecx, esi
mov dword [esp + 0x50], 0xffffffff
call dword [eax + 0xc]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x38], esi
lea eax, [ecx + ebx*2]
mov ebx, dword [0x817108]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x20]
lea ecx, [eax + edx*8]
mov edx, dword [esp + 0x24]
lea eax, [edx + ecx*2]
mov ecx, dword [ebp + 4]
shl eax, 2
mov dword [esp + 0x34], eax
mov esi, dword [ecx + 4]
cmp esi, ebx
mov edi, ecx
mov dl, 1
je 0x59c649
mov edx, dword [esi + 0xc]
mov edi, esi
cmp eax, edx
setb dl
test dl, dl
je 0x59c642
mov esi, dword [esi]
jmp 0x59c645
mov esi, dword [esi + 8]
cmp esi, ebx
jne 0x59c630
mov bl, byte [ebp + 8]
test bl, bl
je 0x59c670
lea eax, [esp + 0x34]
lea ecx, [esp + 0x28]
push eax
push edi
push esi
push ecx
mov ecx, ebp
call fcn.0059fa90
mov edx, dword [eax]
mov byte [esp + 0x40], 1
mov dword [esp + 0x3c], edx
jmp 0x59c6e8
test dl, dl
mov dword [esp + 0x54], edi
je 0x59c6a8
cmp edi, dword [ecx]
jne 0x59c69b
lea eax, [esp + 0x58]
lea ecx, [esp + 0x34]
push eax
push ecx
push edi
lea edx, [esp + 0x38]
push esi
push edx
mov ecx, ebp
mov byte [esp + 0x6c], 1
call fcn.0059fa90
jmp 0x59c6de
lea ecx, [esp + 0x54]
call fcn.0059fe30
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x54]
cmp dword [ecx + 0xc], eax
jae 0x59c6d0
lea edx, [esp + 0x58]
lea eax, [esp + 0x34]
push edx
push eax
push edi
lea ecx, [esp + 0x3c]
push esi
push ecx
mov ecx, ebp
mov byte [esp + 0x6c], 1
call fcn.0059fa90
jmp 0x59c6de
lea edx, [esp + 0x58]
mov byte [esp + 0x58], 0
push edx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x44]
call fcn.0043d520
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x60], eax
jl 0x59c58f
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x40
ret 0x10