Function at 0x401aa0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d810
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
xor ebx, ebx
push edi
cmp eax, ebx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], ebx
je 0x401c96
cmp dword [ebp + 0xc], ebx
je 0x401c96
cmp dword [ebp + 0x10], ebx
je 0x401c96
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
je 0x401c96
push 0x411054
push eax
mov dword [ebp + 0x1c], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
cmp esi, ebx
mov dword [ebp - 0x20], esi
je 0x401c3f
push 2
push ebx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
mov edi, eax
add esp, 0x10
cmp edi, ebx
jle 0x401c2e
lea eax, [edi + 1]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x401c2e
push 0
push 0
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
push edi
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x24]
lea edx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
push ebx
mov byte [ebx + edi], 0
call fcn.004017d0
add esp, 0x30
cmp eax, 1
jne 0x401c1e
mov edx, dword [ebp - 0x18]
add edx, ebx
push edx
call fcn.00401740
mov esi, eax
mov dword [ebp + 0xc], esi
lea eax, [esi + 1]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [ebp - 0x18]
mov ecx, esi
mov edi, eax
add esp, 8
lea esi, [edx + ebx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [ebp - 0x1c], eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
lea edx, [ebp + 8]
push edx
push eax
mov byte [eax + ecx], 0
call fcn.004019f0
add esp, 8
test eax, eax
je 0x401c06
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x18]
cmp edx, ecx
mov dword [ebp - 0x14], ecx
jbe 0x401bdd
mov edx, ecx
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x401c0d
mov ecx, edx
mov esi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 0x18]
and ecx, 3
cmp eax, edx
rep movsb byte es:[edi], byte [esi]
jbe 0x401c0d
mov ecx, dword [ebp + 0x14]
mov byte [edx + ecx], 0
jmp 0x401c0d
mov dword [ebp + 0x1c], 1
mov edx, dword [ebp - 0x1c]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov esi, dword [ebp - 0x20]
add esp, 4
jmp 0x401c25
mov dword [ebp + 0x1c], 1
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [ebp + 0x1c]
add esp, 4
test eax, eax
je 0x401c7c
mov esi, dword [ebp + 0x10]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [ebp + 0x18]
not ecx
dec ecx
cmp eax, ecx
mov dword [ebp - 0x14], ecx
jbe 0x401c5a
mov eax, ecx
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x401c7c
mov ecx, eax
mov edi, edx
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [ebp + 0x18], eax
jbe 0x401c7c
mov byte [eax + edx], 0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret