Function at 0x404130
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.00401af0
push str.Entry
mov ecx, 2
lea ebx, [esp + 0x1c]
call fcn.00401cd0
add esp, 4
test esi, esi
je 0x404390
test ebp, ebp
je 0x404390
push esi
push edi
push str._s_s
mov ecx, 0x104
lea ebx, [esp + 0x640]
call fcn.00401870
add esp, 0xc
test eax, eax
jge 0x4041c3
push eax
push str.StringCchPrintf_failed___08X_
mov ecx, 1
lea ebx, [esp + 0x20]
call fcn.00401cd0
add esp, 8
jmp 0x4043a6
push 0x180
lea ecx, [esp + 0x638]
push 0x8102
push ecx
call fcn.00404f20
add esp, 0xc
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x404210
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.00401cd0
add esp, 0xc
jmp 0x4043a6
mov edi, dword [ebp]
push edi
call fcn.00405945
mov esi, eax
add esp, 4
test esi, esi
jne 0x404284
cmp edi, 0xfff
jae 0x40424d
push str.dwFileSize___4095
lea ecx, [eax + 1]
lea ebx, [esp + 0x1c]
call fcn.00401cd0
mov eax, dword [esp + 0x14]
push eax
call fcn.0040579b
add esp, 8
jmp 0x4043a6
mov edi, 0x1000
push edi
call fcn.00405945
mov esi, eax
add esp, 4
test esi, esi
jne 0x404284
push str.pBuffer_is_NULL
lea ecx, [eax + 1]
lea ebx, [esp + 0x1c]
call fcn.00401cd0
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0040579b
add esp, 8
jmp 0x4043a6
mov eax, dword [ebp]
xor edx, edx
div edi
xor ebx, ebx
mov ebp, eax
mov dword [esp + 0x14], edx
test ebp, ebp
jbe 0x4042ce
push edi
push 0
push esi
call fcn.004099e0
mov edx, dword [esp + 0x850]
push edi
push esi
push edx
call fcn.0040550f
add esp, 0x18
cmp edi, eax
jne 0x404328
mov eax, dword [esp + 0x10]
push edi
push esi
push eax
call fcn.0040667d
inc ebx
add esp, 0xc
cmp ebx, ebp
jb 0x404297
mov edx, dword [esp + 0x14]
test edx, edx
jbe 0x404366
push edx
push 0
push esi
call fcn.004099e0
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x850]
push edi
push esi
push edx
call fcn.0040550f
add esp, 0x18
cmp edi, eax
je 0x404357
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.00401cd0
push esi
call fcn.00405868
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040579b
add esp, 0x10
jmp 0x4043a6
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.00401cd0
push esi
call fcn.00405868
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0040579b
add esp, 0x10
jmp 0x4043a6
mov ecx, dword [esp + 0x10]
push edi
push esi
push ecx
call fcn.0040667d
add esp, 0xc
push esi
call fcn.00405868
mov edx, dword [esp + 0x14]
push edx
call fcn.0040579b
push str.Exit.
mov ecx, 1
lea ebx, [esp + 0x24]
call fcn.00401cd0
add esp, 0xc
mov al, 1
jmp 0x4043a8
push str.NULL_Parameter_received
mov ecx, 1
lea ebx, [esp + 0x1c]
call fcn.00401cd0
add esp, 4
xor al, al
mov ecx, dword [esp + 0x83c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00404cba
add esp, 0x830
ret