Function at 0x420680
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x210
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], bl
mov ebp, dword [esp + 0x224]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0x6c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], ebx
mov ecx, dword [ebp + eax*4 + 0x70]
push ecx
call fcn.004209e0
mov edx, dword [ebp + 0x6c]
lea eax, [ebp + edx*4 + 0x70]
push eax
call fcn.004209a0
add esp, 8
test eax, eax
jne 0x4206da
push 0x43a360
jmp 0x420989
cmp dword [esp + 0x22c], ebx
jne 0x4207ce
mov ecx, dword [esp + 0x228]
lea edx, [esp + 0x20]
push ecx
push edx
push ebp
call fcn.00424b60
lea eax, [esp + 0x2c]
push 0x43a35c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x14
cmp esi, ebx
je 0x420992
push 2
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push esi
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push esi
mov dword [esp + 0x2c], eax
call ebx
mov ecx, dword [esp + 0x2c]
inc ecx
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, dword [sym.imp.MSVCRT.dll_fclose]
mov ebx, eax
add esp, 0x20
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x420765
push 0x43a350
push ebp
call fcn.00420310
push esi
call edi
add esp, 0xc
mov edx, dword [esp + 0x10]
push esi
push edx
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call edi
mov eax, dword [esp + 0x24]
mov byte [eax + ebx], 0
mov ecx, dword [esp + 0x24]
push ecx
push ebx
call fcn.00425ee0
add esp, 0x1c
test eax, eax
je 0x4207c8
mov eax, dword [esp + 0x10]
lea edx, [ebp + 0x22c0]
push edx
push eax
push ebx
call fcn.00425c20
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4207c5
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
add ebx, 8
mov dword [esp + 0x14], ebx
jmp 0x42080f
mov eax, dword [esp + 0x228]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push edx
push str._d__d
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.MSVCRT.dll_sscanf]
mov ecx, dword [esp + 0x24]
add esp, 0x10
push 4
push ecx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x420992
mov edx, dword [esp + 0x14]
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.00420a00
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x420853
mov eax, dword [esp + 0x22c]
test eax, eax
jne 0x420992
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
cmp eax, 0x59d8
jl 0x420892
push 0x43a344
push ebp
call fcn.00420310
mov eax, dword [esp + 0x234]
add esp, 8
test eax, eax
jne 0x420992
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
mov ebx, dword [sym.imp.MSVCRT.dll_malloc]
lea edi, [eax*4]
push edi
call ebx
push edi
mov esi, eax
call ebx
add esp, 8
mov ebx, eax
test esi, esi
je 0x420955
test ebx, ebx
je 0x420955
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
push esi
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x24]
mov edi, ebx
lea ecx, [eax*4]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
push eax
push edi
call fcn.00415f10
mov ecx, dword [esp + 0x2c]
mov edx, dword [ebp + 0x6c]
push ecx
mov ecx, dword [esp + 0x24]
mov eax, dword [ebp + edx*4 + 0x70]
push ebx
push esi
push eax
push ecx
push edi
push ebp
call fcn.00420a40
mov eax, dword [esp + 0x258]
mov edi, dword [sym.imp.MSVCRT.dll_free]
add esp, 0x2c
test eax, eax
jne 0x420937
mov edx, dword [esp + 0x18]
push edx
call edi
add esp, 4
push esi
call edi
push ebx
call edi
mov eax, dword [ebp + 0x6c]
push eax
push ebp
call fcn.00421020
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
mov eax, dword [esp + 0x22c]
mov edi, dword [sym.imp.MSVCRT.dll_free]
test eax, eax
jne 0x420970
mov ecx, dword [esp + 0x18]
push ecx
call edi
add esp, 4
test esi, esi
je 0x42097a
push esi
call edi
add esp, 4
test ebx, ebx
je 0x420984
push ebx
call edi
add esp, 4
push 0x43a350
push ebp
call fcn.00420310
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x210
ret