Function at 0x40270b
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x138
xor ebx, ebx
push 0x40
mov dword [0x415b48], ebx
call edi
mov esi, eax
cmp esi, ebx
je 0x402a35
push 0xe038
push 0x40
call edi
cmp eax, ebx
mov dword [esi + 0x134], eax
je 0x402a2e
push 0x104
lea eax, [ebp - 0x134]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x402a2e
lea eax, [ebp - 0x134]
push eax
call fcn.00408810
mov byte [eax], bl
lea eax, [ebp - 0x134]
push eax
call fcn.00408752
pop ecx
pop ecx
push eax
mov eax, dword [esi + 0x134]
add eax, 0x3404
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [esi + 4]
call fcn.0040443f
cmp eax, ebx
pop ecx
mov dword [ebp - 8], eax
je 0x402a24
push ebx
push ebx
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 4]
push eax
push 0x24
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 4], ebx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [ebp - 0x30], 0x6c
jne 0x402a24
cmp byte [ebp - 0x2f], 0x73
jne 0x402a24
cmp byte [ebp - 0x2e], 0x66
jne 0x402a24
cmp byte [ebp - 0x2d], 0x78
jne 0x402a24
push ebx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [ebp - 0x24]
je 0x40283a
push ebx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub eax, dword [ebp - 0x24]
cmp eax, 1
jne 0x402866
push ebx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub eax, dword [ebp - 0x24]
dec eax
neg eax
sbb eax, eax
inc eax
push eax
push dword [ebp - 8]
push dword [esi + 4]
call fcn.00404baf
add esp, 0xc
test eax, eax
jne 0x402875
test byte [ebp - 0x2a], 0x10
jne 0x402875
mov dword [0x415b48], 6
jmp 0x402a2e
mov eax, dword [ebp - 8]
push ebx
push ebx
add eax, 0x24
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x28]
push 0x40
call edi
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x4028a4
mov dword [0x415b48], 2
jmp 0x402a2e
push ebx
lea ecx, [ebp - 4]
push ecx
push dword [ebp - 0x28]
mov dword [ebp - 4], ebx
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x1a], ebx
je 0x402903
push dword [ebp - 0x1a]
push 0x40
call edi
mov ecx, dword [esi + 0x134]
mov dword [ecx + 0xd9a0], eax
mov eax, dword [esi + 0x134]
cmp dword [eax + 0xd9a0], ebx
je 0x402a2e
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1a]
mov dword [ebp - 4], ebx
mov eax, dword [esi + 0x134]
push dword [eax + 0xd9a0]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0xc]
push dword [esi + 0x134]
call fcn.00403fc6
test eax, eax
pop ecx
pop ecx
push dword [ebp - 0xc]
jne 0x402925
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x402a2e
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esi + 0x134]
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0x3400], ecx
mov eax, dword [esi + 0x134]
mov ecx, dword [ebp - 0x12]
mov dword [eax + 0xd9ac], ecx
movzx eax, word [ebp - 0xe]
mov ecx, dword [esi + 0x134]
push esi
mov dword [ecx + 0xdb1c], eax
call fcn.00403486
mov eax, dword [esi + 0x134]
test byte [eax + 0x3400], 4
pop ecx
je 0x4029a0
add eax, 0x42
push eax
call fcn.0040878e
mov eax, dword [esi + 0x134]
pop ecx
lea ecx, [eax + 0x3404]
push ecx
add eax, 0x42
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [esi + 0x134]
add eax, 0x42
push eax
call fcn.0040878e
pop ecx
mov ecx, dword [esi + 0x134]
xor eax, eax
test byte [ecx + 0x3400], 8
je 0x4029b4
push 1
pop eax
cmp dword [ebp - 0x1a], ebx
je 0x4029bc
push 1
pop eax
cmp eax, ebx
je 0x402a04
mov edi, 0x800
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [esi + 0x134]
mov dword [ecx + 0x3508], eax
mov eax, dword [esi + 0x134]
push dword [eax + 0x3508]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [esi + 0x134]
mov dword [ecx + 0x350c], eax
mov eax, dword [esi + 0x134]
mov dword [eax + 0x3510], edi
mov eax, dword [ebp - 0x16]
mov ecx, dword [ebp - 8]
push ebx
push dword [esi + 4]
add eax, ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub eax, dword [esi]
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], eax
mov eax, esi
jmp 0x402a37
mov dword [0x415b48], 1
push esi
call fcn.00402a3c
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret