Function at 0x401330
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x238
push ebx
push ebp
mov ebp, dword [esp + 0x244]
push esi
push edi
push 0x104
mov dword [ebp + 0x10], 0
mov eax, dword [0x4095a0]
lea esi, [ebp + 0x21c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0x10000000
push 3
push 0
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
test ebx, ebx
jne 0x40138a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x238
ret
push 2
push 0
push 0xffffffffffffffdc
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x24]
push 0x24
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4013c4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
cmp dword [esp + 0x1c], 0x314159
jne 0x4013d5
cmp dword [esp + 0x20], 0x24
je 0x4013e9
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
add ebp, 0x14
push ebp
call fcn.004018f0
add esp, 4
test eax, eax
jne 0x40140d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x40]
push ebp
push eax
call edi
lea ecx, [esp + 0x144]
push ebp
push ecx
call edi
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
push str.ShFill._xe
lea eax, [esp + esi + 0x44]
push eax
mov dword [esp + 0x1c], eax
call edi
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x40]
push ecx
push edx
push eax
push ebx
call fcn.004019a0
add esp, 0x10
test eax, eax
jne 0x40147b
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
lea eax, [esp + esi + 0x144]
push str.ShFill.exe
push eax
mov dword [esp + 0x20], eax
call edi
lea ecx, [esp + 0x40]
push ebp
lea edx, [esp + 0x148]
push ecx
push edx
call fcn.00401790
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4014be
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
add ecx, eax
mov eax, dword [esp + 0x2c]
test eax, eax
mov dword [esp + 0x10], ecx
jle 0x40155e
mov ecx, dword [esp + 0x14]
push str.vtssdl32._dl
push ecx
call edi
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x40]
push edx
push eax
push ecx
push ebx
call fcn.004019a0
add esp, 0x10
test eax, eax
jne 0x401514
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov edx, dword [esp + 0x18]
push str.vtssdl32.dll
push edx
call edi
lea eax, [esp + 0x40]
push ebp
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.00401790
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x401550
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
add eax, edx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x30]
test eax, eax
jle 0x4015f0
mov eax, dword [esp + 0x14]
push str.codebar._dl
push eax
call edi
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x40]
push ecx
push edx
push eax
push ebx
call fcn.004019a0
add esp, 0x10
test eax, eax
jne 0x4015a6
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov ecx, dword [esp + 0x18]
push str.codebar.dll
push ecx
call edi
lea edx, [esp + 0x40]
push ebp
lea eax, [esp + 0x148]
push edx
push eax
call fcn.00401790
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4015e2
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
add eax, ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
test eax, eax
jle 0x401682
mov edx, dword [esp + 0x14]
push str.zlib._dl
push edx
call edi
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x40]
push eax
push ecx
push edx
push ebx
call fcn.004019a0
add esp, 0x10
test eax, eax
jne 0x401638
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov eax, dword [esp + 0x18]
push str.zlib.dll
push eax
call edi
lea ecx, [esp + 0x40]
push ebp
lea edx, [esp + 0x148]
push ecx
push edx
call fcn.00401790
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x401674
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x10]
add ecx, eax
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x38]
test eax, eax
jle 0x4016d6
mov ecx, dword [esp + 0x14]
push str.Form.ftf
push ecx
call edi
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x40]
push edx
push eax
push ecx
push ebx
call fcn.004019a0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x4016c8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x10]
add eax, edx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x40172a
mov eax, dword [esp + 0x14]
push str.Form.fdd
push eax
call edi
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x40]
push ecx
push edx
push eax
push ebx
call fcn.004019a0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x40171c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x10]
add ecx, eax
mov dword [esp + 0x10], ecx
mov edi, dword [esp + 0x24c]
mov ebp, dword [esp + 0x30]
xor ecx, ecx
push ebx
test eax, eax
setg cl
xor edx, edx
mov dword [edi], ecx
mov ecx, dword [esp + 0x30]
test ebp, ebp
mov ebp, dword [esp + 0x38]
setg dl
xor eax, eax
mov dword [edi + 8], edx
test ecx, ecx
setg al
xor ecx, ecx
mov dword [edi + 4], eax
test ebp, ebp
setg cl
mov dword [edi + 0xc], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00401950
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x238
ret