Function at 0x403190
Capabilities:
Read file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 8
push esi
xor esi, esi
cmp ecx, esi
jne 0x4031a8
mov eax, 4
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x14]
cmp eax, esi
jne 0x4031ba
mov eax, 4
pop esi
add esp, 8
ret
push ebp
push 0x4091e4
push ecx
mov dword [eax], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], esi
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
cmp ebp, esi
jne 0x4031e2
mov dword [esp + 0x14], 0x49
mov eax, dword [esp + 0x14]
push ebx
xor ebx, ebx
cmp eax, esi
jne 0x403208
push 0xc350
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
add esp, 4
cmp ebx, esi
jne 0x403208
mov dword [esp + 0x18], 0x3a
mov eax, dword [esp + 0x18]
push edi
cmp eax, esi
mov dword [esp + 0x10], esi
jne 0x40339b
mov edi, str.14d734af_f56a_11d5_b33a_000244035579
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x10]
dec ecx
push eax
push str.14d734af_f56a_11d5_b33a_000244035579
mov edi, ecx
call fcn.004022b0
add esp, 8
cmp eax, esi
mov dword [esp + 0x1c], eax
jne 0x403388
cmp dword [esp + 0x10], esi
jne 0x40325b
mov dword [esp + 0x1c], 2
jmp 0x40339b
push ebp
push 0xc350
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov esi, eax
add edi, edi
cmp esi, edi
jle 0x4032c3
push 0x5f
push esi
push ebx
call fcn.00402350
mov ecx, dword [esp + 0x1c]
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 0x14
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4032c7
mov edx, 1
push 1
sub edx, edi
push edx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x4032e2
push ebp
push 0xc350
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov esi, eax
jmp 0x403271
mov eax, dword [esp + 0x14]
cmp esi, edi
jle 0x4032ef
sub edi, ebx
push 1
sub edi, esi
add edi, eax
push edi
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
je 0x4032ef
mov dword [esp + 0x1c], 0x4a
jmp 0x403388
push ebp
mov ecx, 0x30d4
xor eax, eax
mov edi, ebx
push 0xc34f
push 1
rep stosd dword es:[edi], eax
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
jne 0x403327
mov eax, dword [ebp + 0xc]
and al, 0x10
neg al
sbb eax, eax
and eax, 0x789
add eax, 0x4b
mov dword [esp + 0x1c], eax
jmp 0x403388
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x40333f
mov dword [esp + 0x1c], 0x7d4
jmp 0x403388
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x24]
mov edx, eax
add esp, 4
test edx, edx
mov dword [ecx], edx
jne 0x403369
mov dword [esp + 0x1c], 0x3a
jmp 0x403388
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
xor esi, esi
cmp eax, esi
je 0x40339b
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp ebx, esi
pop edi
je 0x4033a9
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp ebp, esi
pop ebx
je 0x4033b8
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, dword [esp + 0x14]
pop ebp
pop esi
add esp, 8
ret