Function at 0x41c580
Capabilities:
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x46d98e
push eax
mov dword fs:[0], esp
sub esp, 0xf4
push ebx
push ebp
push esi
mov esi, ecx
push edi
cmp byte [esi + 8], 0xdb
je 0x41c5b4
xor edi, edi
push edi
call fcn.0041c110
add esp, 4
jmp 0x41c5b6
xor edi, edi
mov eax, dword [esi + 0xc]
cmp eax, edi
je 0x41c5d0
mov cl, byte [esi + 9]
test cl, cl
jne 0x41c5cd
push eax
call fcn.0045ccbf
add esp, 4
mov dword [esi + 0xc], edi
lea ecx, [esp + 0x44]
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov byte [esi + 9], 0
call fcn.00417560
mov eax, dword [esp + 0x114]
lea ecx, [esp + 0x44]
push eax
mov dword [esp + 0x110], edi
call fcn.00417770
mov ebp, dword [esp + 0x118]
lea ecx, [esp + 0x44]
push ebp
push ecx
call fcn.00419490
mov ebx, eax
add esp, 8
cmp ebx, 0xffffffff
je 0x41c6f9
push ebp
push ebx
call fcn.0041a070
mov edi, edx
xor ecx, ecx
add esp, 8
cmp edi, ecx
mov dword [esp + 0x20], eax
jg 0x41c63d
jl 0x41c637
cmp eax, ecx
jae 0x41c63d
push ecx
jmp 0x41c6f0
mov edx, eax
or edx, edi
jne 0x41c668
push ecx
push ebx
call fcn.0043ca40
add esp, 8
lea ecx, [esp + 0x44]
mov dword [esp + 0x10c], 0xffffffff
call fcn.00417620
mov al, 1
jmp 0x41c858
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x14]
push ecx
push edx
push edi
push eax
call fcn.004409e0
mov eax, dword [esp + 0x2c]
add esp, 0x10
test eax, eax
jbe 0x41c6b2
test ebp, ebp
je 0x41c6ee
mov eax, dword [ebp]
push str.Out_of_memory_for_data_buffer
mov ecx, ebp
call dword [eax + 0x10]
mov eax, dword [esp + 0x20]
mov edx, dword [ebp]
push edi
push eax
push str.fileSize
mov ecx, ebp
call dword [edx + 0x30]
jmp 0x41c6ee
mov ecx, dword [esp + 0x14]
add ecx, 4
push ecx
call fcn.0045d5c0
mov edx, eax
add esp, 4
test edx, edx
mov dword [esi + 0xc], edx
jne 0x41c714
test ebp, ebp
je 0x41c6ee
mov edx, dword [ebp]
push str.Out_of_memory
mov ecx, ebp
call dword [edx + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp]
push ecx
push str.fileSize
mov ecx, ebp
call dword [eax + 0x2c]
push 0
push ebx
call fcn.0043ca40
add esp, 8
lea ecx, [esp + 0x44]
mov dword [esp + 0x10c], 0xffffffff
call fcn.00417620
xor al, al
jmp 0x41c858
mov eax, dword [esp + 0x14]
mov edi, edx
push 0
lea ecx, [eax + 4]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [esp + 0x1c]
and ecx, 3
push edx
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], 0
mov dword [esi + 0x10], eax
push eax
lea ecx, [eax + 4]
mov eax, dword [esi + 0xc]
push eax
push ebx
mov dword [esi + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov byte [esp + 0x13], 1
jne 0x41c813
test ebp, ebp
je 0x41c80e
lea ecx, [esp + 0x28]
call fcn.004146b0
lea ecx, [esp + 0x28]
mov byte [esp + 0x10c], 1
call fcn.004159e0
mov esi, dword [ebp]
lea ecx, [esp + 0x28]
call fcn.00443b00
push eax
mov ecx, ebp
call dword [esi + 0x10]
mov eax, dword [esp + 0x114]
mov edx, dword [ebp]
push eax
push str.filename
mov ecx, ebp
call dword [edx + 0x28]
lea ecx, [esp + 0xa4]
call fcn.00417560
lea ecx, [esp + 0xa4]
mov byte [esp + 0x10c], 2
push ecx
call fcn.004186d0
mov esi, dword [ebp]
add esp, 4
lea ecx, [esp + 0xa4]
call fcn.00417cf0
push eax
push str.current_dir
mov ecx, ebp
call dword [esi + 0x28]
lea ecx, [esp + 0xa4]
mov byte [esp + 0x10c], 1
call fcn.00417620
lea ecx, [esp + 0x28]
mov byte [esp + 0x10c], 0
call fcn.004149a0
mov byte [esp + 0x13], 0
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
cmp edx, eax
je 0x41c835
test ebp, ebp
je 0x41c830
mov eax, dword [ebp]
push str.Failed_to_read_the_entire_file
mov ecx, ebp
call dword [eax + 0x10]
mov byte [esp + 0x13], 0
push 0
push ebx
call fcn.0043ca40
add esp, 8
lea ecx, [esp + 0x44]
mov dword [esp + 0x10c], 0xffffffff
call fcn.00417620
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x104]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x100
ret 8