Function at 0x4041c0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x830
mov eax, dword [0x41a2b4]
xor eax, esp
mov dword [esp + 0x82c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x840]
push esi
push edi
push str.ExtractAttachedFile
lea eax, [esp + 0x1c]
push eax
mov edi, ecx
mov esi, edx
call fcn.00401b20
push str.Entry
mov ecx, 2
lea ebx, [esp + 0x1c]
call fcn.00401d00
add esp, 4
test esi, esi
je 0x404420
test ebp, ebp
je 0x404420
push esi
push edi
push str._s_s
mov ecx, 0x104
lea ebx, [esp + 0x640]
call fcn.00401440
add esp, 0xc
test eax, eax
jge 0x404253
push eax
push str.StringCchPrintf_failed___08X_
mov ecx, 1
lea ebx, [esp + 0x20]
call fcn.00401d00
add esp, 8
jmp 0x404436
push 0x180
lea ecx, [esp + 0x638]
push 0x8102
push ecx
call fcn.00404f40
add esp, 0xc
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x4042a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x638]
push edx
push str._open_failed_for__s___u_
mov ecx, 1
lea ebx, [esp + 0x24]
call fcn.00401d00
add esp, 0xc
jmp 0x404436
mov edi, dword [ebp]
push edi
call fcn.00405cd3
mov esi, eax
add esp, 4
test esi, esi
jne 0x404314
cmp edi, 0xfff
jae 0x4042dd
push str.dwFileSize___4095
lea ecx, [eax + 1]
lea ebx, [esp + 0x1c]
call fcn.00401d00
mov eax, dword [esp + 0x14]
push eax
call fcn.004057bb
add esp, 8
jmp 0x404436
mov edi, 0x1000
push edi
call fcn.00405cd3
mov esi, eax
add esp, 4
test esi, esi
jne 0x404314
push str.pBuffer_is_NULL
lea ecx, [eax + 1]
lea ebx, [esp + 0x1c]
call fcn.00401d00
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004057bb
add esp, 8
jmp 0x404436
mov eax, dword [ebp]
xor edx, edx
div edi
xor ebx, ebx
mov ebp, eax
mov dword [esp + 0x14], edx
test ebp, ebp
jbe 0x40435e
push edi
push 0
push esi
call fcn.00409a00
mov edx, dword [esp + 0x850]
push edi
push esi
push edx
call fcn.0040552f
add esp, 0x18
cmp edi, eax
jne 0x4043b8
mov eax, dword [esp + 0x10]
push edi
push esi
push eax
call fcn.00406728
inc ebx
add esp, 0xc
cmp ebx, ebp
jb 0x404327
mov edx, dword [esp + 0x14]
test edx, edx
jbe 0x4043f6
push edx
push 0
push esi
call fcn.00409a00
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x850]
push edi
push esi
push edx
call fcn.0040552f
add esp, 0x18
cmp edi, eax
je 0x4043e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._read_Failed_for_lines___u_
mov ecx, 1
lea ebx, [esp + 0x20]
call fcn.00401d00
push esi
call fcn.00405bf6
mov eax, dword [esp + 0x1c]
push eax
call fcn.004057bb
add esp, 0x10
jmp 0x404436
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._read_Failed_for_pages___u_
mov ecx, 1
lea ebx, [esp + 0x20]
call fcn.00401d00
push esi
call fcn.00405bf6
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.004057bb
add esp, 0x10
jmp 0x404436
mov ecx, dword [esp + 0x10]
push edi
push esi
push ecx
call fcn.00406728
add esp, 0xc
push esi
call fcn.00405bf6
mov edx, dword [esp + 0x14]
push edx
call fcn.004057bb
push str.Exit.
mov ecx, 1
lea ebx, [esp + 0x24]
call fcn.00401d00
add esp, 0xc
mov al, 1
jmp 0x404438
push str.NULL_Parameter_received
mov ecx, 1
lea ebx, [esp + 0x1c]
call fcn.00401d00
add esp, 4
xor al, al
mov ecx, dword [esp + 0x83c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00404cda
add esp, 0x830
ret