Function at 0x40e610
Capabilities:
Parse pe header
Read file on windows
Timestomp file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x42f8d8]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor esi, esi
cmp dword [0x42f6d4], esi
push edi
mov edi, ecx
jge 0x40e66a
lea eax, [ebp - 0xd8]
push eax
mov dword [ebp - 0xd8], 0x94
mov dword [0x42f6d4], esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40e664
xor ecx, ecx
cmp dword [ebp - 0xc8], 2
sete cl
mov dword [0x42f6d4], ecx
cmp dword [0x42f6d4], esi
mov eax, edi
je 0x40e816
call fcn.0040e5b0
cmp eax, 0x6d6f632e
ja 0x40e7fa
je 0x40e7e5
cmp eax, 0x646d632e
je 0x40e801
cmp eax, 0x6578652e
jne 0x40e834
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
push esi
push 3
push esi
push 3
push 0x80000100
push edi
mov word [ebp - 0xea], si
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x40e6df
push 0
push 0
push 3
push 0
push 3
push bind
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x40e8ae
push 0
lea edx, [ebp - 0xe8]
push edx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x40e707
push 0
lea eax, [ebp - 0xe8]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [ebp - 0xe0]
push ecx
push 0x40
lea edx, [ebp - 0x44]
push edx
push esi
call edi
test eax, eax
je 0x40e8a7
cmp dword [ebp - 0xe0], 0x40
jne 0x40e8a7
cmp word [ebp - 0x44], 0x5a4d
jne 0x40e8a7
mov eax, dword [ebp - 8]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push eax
push esi
call ebx
push 0
lea ecx, [ebp - 0xe0]
push ecx
push 0x40
lea edx, [ebp - 0x128]
push edx
push esi
call edi
mov ax, word [ebp - 0x128]
cmp ax, 0x4550
jne 0x40e846
mov eax, dword [ebp - 8]
push 0
push 0
add eax, 0x48
push eax
push esi
call ebx
push 0
lea ecx, [ebp - 0xe0]
push ecx
push 4
lea edx, [ebp - 0xdc]
push edx
push esi
call edi
movzx ax, byte [ebp - 0xda]
mov ah, byte [ebp - 0xdc]
mov ecx, dword [ebp - 8]
push 0
push 0
add ecx, 0x5c
push ecx
push esi
mov word [ebp - 0xea], ax
call ebx
push 0
lea edx, [ebp - 0xe0]
push edx
push 4
lea eax, [ebp - 0xdc]
push eax
push esi
call edi
cmp word [ebp - 0xdc], 2
je 0x40e87c
jmp 0x40e873
pop edi
mov eax, 0x5a4d
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414407
mov esp, ebp
pop ebp
ret
cmp eax, 0x7461622e
jne 0x40e834
pop edi
mov eax, 0x4550
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414407
mov esp, ebp
pop ebp
ret
call fcn.0040e5b0
cmp eax, 0x6578652e
je 0x40e69e
cmp eax, 0x6d6f632e
je 0x40e7e5
cmp eax, 0x7461622e
je 0x40e7e5
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414407
mov esp, ebp
pop ebp
ret
cmp ax, 0x454c
je 0x40e86a
cmp ax, 0x454e
jne 0x40e86a
mov al, byte [ebp - 0xf2]
cmp al, 2
je 0x40e860
test al, al
jne 0x40e86a
cmp word [ebp - 0xea], 0
jne 0x40e87c
mov word [ebp - 0x128], 0x5a4d
mov word [ebp - 0xea], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, word [ebp - 0xea]
movzx ecx, word [ebp - 0x128]
pop ebx
shl eax, 0x10
pop edi
or eax, ecx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414407
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop ebx
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.00414407
mov esp, ebp
pop ebp
ret