Function at 0x59ae60
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x7f8
push ebx
push ebp
push esi
push edi
mov ebx, ecx
push 0
push 0x6d74f8
mov dword [esp + 0x20], ebx
call fcn.00646940
lea edi, [ebx + 0x4b08]
add esp, 8
mov dword [ebx + 0x4c14], 0
mov esi, 0x6dfe28
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x59aeba
test cl, cl
je 0x59aeb6
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x59aeba
add eax, 2
add esi, 2
test cl, cl
jne 0x59ae96
xor eax, eax
jmp 0x59aebf
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x59aeeb
mov ecx, dword [ebx + 0x40c4]
mov edi, dword [ebx + 0x4c0c]
imul ecx, ecx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7f8
ret
lea eax, [esp + 0x3fc]
push 0x104
push eax
push 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
push 0
lea ecx, [esp + 0x608]
push 0
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x408]
push edx
push eax
call fcn.0067451b
add esp, 0x14
lea ecx, [esp + 0x1f4]
push 0x6d74ec
push ecx
call fcn.0067429f
add esp, 8
lea edx, [esp + 0x1f4]
lea eax, [esp + 0x604]
lea ecx, [esp + 0xf4]
push edx
push eax
push 0x6d3b58
push ecx
call fcn.0067429f
push 0x6d74e8
lea edx, [esp + 0x108]
push edi
lea eax, [esp + 0x28]
push edx
lea ecx, [esp + 0x314]
push eax
push ecx
call fcn.00674f2f
add esp, 0x24
lea edx, [esp + 0x2f8]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push edx
call dword [sym.imp.kernel32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x1c], esi
je 0x59b12f
mov edi, dword [sym.imp.kernel32.dll_ReadFile]
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x2c]
push 0x50
push ecx
push esi
call edi
test eax, eax
je 0x59b128
mov ebp, 0x6d74d8
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [ebp]
jne 0x59aff7
test cl, cl
je 0x59aff3
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [ebp + 1]
jne 0x59aff7
add eax, 2
add ebp, 2
test cl, cl
jne 0x59afd2
xor eax, eax
jmp 0x59affc
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x59b128
push eax
lea eax, [esp + 0x18]
push eax
lea ebp, [ebx + 0x4c14]
push 4
push ebp
push esi
call edi
test eax, eax
je 0x59b128
mov eax, dword [ebp]
xor ebx, ebx
test eax, eax
jle 0x59b128
mov ebp, 0x64
jmp 0x59b038
mov edi, dword [sym.imp.kernel32.dll_ReadFile]
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x28]
push 4
push edx
push esi
call edi
test eax, eax
je 0x59b128
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x508]
push 0x104
push ecx
push esi
call edi
test eax, eax
je 0x59b128
lea edx, [esp + 0x500]
push 0
lea eax, [esp + 0xf8]
push edx
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x710]
push ecx
push edx
call fcn.00674f2f
mov ecx, dword [esp + 0x34]
add esp, 0x14
xor eax, eax
cmp ecx, 1
je 0x59b0aa
sar ecx, 1
inc eax
cmp ecx, 1
jne 0x59b0a2
mov edx, dword [esp + 0x18]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edi, [esp + 0x704]
xor eax, eax
lea edx, [edx + ecx*4 + 0x42e8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
cdq
idiv dword [ecx + 0x4c14]
lea edi, [ecx + 0x4c14]
lea edx, [esp + 0x74]
mov esi, eax
push esi
push 0x6d74b4
push edx
call fcn.0067429f
lea eax, [esp + 0x80]
push esi
push eax
call fcn.00646940
mov eax, dword [edi]
mov esi, dword [esp + 0x30]
add esp, 0x14
inc ebx
add ebp, 0x64
cmp ebx, eax
jl 0x59b032
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7f8
ret