Function at 0x46b750
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
xor ebp, ebp
push esi
push ebx
lea ebx, [ebp + 1]
sub esp, 0x3c
mov eax, dword [esp + 0x50]
mov dword [esp + 0x18], 0x7d0
mov edi, dword [esp + 0x54]
mov ecx, dword [eax]
cmp ebx, ecx
jge 0x46b78c
mov edx, dword [edi]
lea esi, [ebx*4]
mov eax, dword [edx + ebx*4]
cmp byte [eax], 0x40
je 0x46b794
mov ebp, ebx
lea ebx, [ebp + 1]
cmp ebx, ecx
jl 0x46b772
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
sub dword [esp + 0x18], 1
je 0x46b9f2
add eax, 1
mov dword [esp + 4], 0x49bca9
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
je 0x46b9a8
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [esp + 0x14], eax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
mov edx, dword [esp + 0x14]
je 0x46b9a0
mov dword [esp], edx
call sub.msvcrt.dll_ftell
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x14]
je 0x46b9a0
mov dword [esp], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
mov edx, dword [esp + 0x14]
je 0x46b9a0
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x20], edx
lea eax, [ecx + 1]
mov dword [esp], eax
call fcn.00470f00
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
call sub.msvcrt.dll_fread
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
cmp ecx, eax
je 0x46b86e
test byte [edx + 0xc], 0x20
jne 0x46b9a0
mov ecx, dword [esp + 0x14]
mov byte [ecx + eax], 0
movzx eax, byte [ecx]
test al, al
jne 0x46b890
jmp 0x46b9b5
add ecx, 1
movzx eax, byte [ecx]
test al, al
je 0x46b9b5
test byte [eax + eax + 0x49ca40], 0x40
jne 0x46b882
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], edx
mov dword [esp], eax
call fcn.0046b470
mov ecx, dword [eax]
mov dword [esp + 0x20], eax
mov eax, dword [edi]
mov dword [esp + 0x1c], ecx
mov dword [esp], eax
call fcn.0046b3a0
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
mov dword [edi], eax
mov edx, dword [esp + 0x28]
test ecx, ecx
je 0x46ba1c
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov dword [esp + 0x28], ebp
nop
add ecx, 1
cmp dword [eax + ecx*4], 0
lea ebp, [ecx*4]
jne 0x46b8e0
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x50]
mov eax, ecx
mov dword [esp + 0x28], ecx
add eax, dword [edx]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.00470f80
mov edx, eax
mov dword [edi], eax
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax]
mov dword [esp + 0x24], ecx
sub eax, ebx
add ebx, ecx
shl eax, 2
mov dword [esp + 8], eax
lea eax, [edx + esi + 4]
mov dword [esp + 4], eax
lea eax, [edx + ebx*4]
mov dword [esp], eax
call sub.msvcrt.dll_memmove
add esi, dword [edi]
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], ebx
mov dword [esp], esi
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x50]
mov eax, dword [eax]
lea eax, [ecx + eax - 1]
mov dword [esi], eax
mov dword [esp], ebx
mov ebx, ebp
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [esp + 0x2c]
mov esi, esi
lea edi, [edi]
mov dword [esp], edx
call sub.msvcrt.dll_fclose
mov eax, dword [esp + 0x50]
mov ebp, ebx
mov ecx, dword [eax]
jmp 0x46b785
mov dword [esp], 4
mov dword [esp + 0x28], edx
call fcn.00470f00
mov dword [eax], 0
mov dword [esp + 0x20], eax
mov eax, dword [edi]
mov dword [esp], eax
call fcn.0046b3a0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], eax
xor ecx, ecx
mov dword [edi], eax
mov edx, dword [esp + 0x28]
jmp 0x46b8f8
mov eax, dword [edx]
mov dword [esp + 4], str._s:_error:_too_many___files_encountered_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0046b370
mov dword [esp], 1
call fcn.00470e50
mov dword [esp + 0x1c], 0
jmp 0x46b8f8