Function at 0x40e060
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x234
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x141]
mov byte [esp + 0x140], bl
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x144]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push ebx
push ebx
push 3
push ebx
push 1
lea ecx, [esp + 0x154]
push SysReAllocStringLen
push ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
mov ebp, eax
push ebx
push 0x3c
push ebp
call edi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x14]
push ebx
push edx
lea eax, [esp + 0x20]
push 4
push eax
push ebp
call esi
mov ecx, dword [esp + 0x18]
push ebx
push ebx
push ecx
push ebp
call edi
lea edx, [esp + 0x14]
push ebx
push edx
lea eax, [esp + 0x34]
push 4
push eax
push ebp
call esi
cmp dword [esp + 0x2c], 0x4550
jne 0x40e260
mov ecx, dword [esp + 0x18]
push ebx
push ebx
mov dword [esp + 0x28], ebx
lea eax, [ecx + 0x18]
push eax
push ebp
mov dword [esp + 0x20], eax
call edi
lea edx, [esp + 0x14]
push ebx
push edx
lea eax, [esp + 0x28]
push 2
push eax
push ebp
call esi
mov eax, dword [esp + 0x20]
cmp ax, 0x10b
jne 0x40e143
mov eax, dword [esp + 0x10]
add eax, 0x80
jmp 0x40e15a
cmp ax, 0x20b
jne 0x40e260
mov eax, dword [esp + 0x10]
add eax, 0x90
mov dword [esp + 0x10], eax
test eax, eax
je 0x40e260
push 0
push 0
push eax
push ebp
call edi
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x2c]
push 4
push edx
push ebp
call esi
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x18]
push 4
push ecx
push ebp
call esi
mov eax, dword [esp + 0x24]
xor ecx, ecx
cmp eax, ecx
je 0x40e260
xor edx, edx
push ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], ecx
push ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], edx
lea edx, [ecx + eax - 0x10]
push edx
push ebp
call edi
lea eax, [esp + 0x1c]
push 0
push eax
lea ecx, [esp + 0x38]
push 0x10
push ecx
push ebp
call esi
mov eax, dword [esp + 0x3c]
push eax
mov dword [esp + 0x2c], eax
call fcn.00419c1d
mov edx, dword [esp + 0x14]
mov ebx, eax
mov eax, dword [esp + 0x2c]
add esp, 4
sub edx, eax
mov eax, dword [esp + 0x24]
push 0
push 0
lea ecx, [edx + eax - 0x10]
push ecx
push ebp
call edi
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x1c]
push 0
push edx
push eax
push ebx
push ebp
call esi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x41]
mov byte [esp + 0x40], 0
rep stosd dword es:[edi], eax
push 0
push 0
lea ecx, [esp + 0x48]
push 0xff
push ecx
push 0x80
stosw word es:[edi], ax
push ebx
push 0
push 0
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [esp + 0x40]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x234
ret