Function at 0x43e7fc
Capabilities:
Parse pe header
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeb4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov byte [ebp - 1], dl
mov esi, eax
xor eax, eax
push ebp
push 0x43ea4e
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 2], 0
xor ebx, ebx
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
mov eax, esi
call fcn.00404998
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x43e857
mov byte [ebp - 2], 1
jmp 0x43ea32
push 0
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
je 0x43e886
push 0
lea eax, [ebp - 8]
push eax
push 0x40
lea eax, [ebp - 0x54]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x43e886
mov bl, 1
test bl, bl
jne 0x43e893
mov byte [ebp - 2], 1
jmp 0x43ea32
xor ebx, ebx
cmp word [ebp - 0x54], 0x5a4d
je 0x43e8a3
cmp dword [ebp - 8], 0x40
jne 0x43e8f1
push 0
push 0
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
je 0x43e8f1
push 0
lea eax, [ebp - 8]
push eax
push 0xf8
lea eax, [ebp - 0x14c]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x43e8f1
cmp dword [ebp - 0x14c], 0x4550
jne 0x43e8f1
cmp word [ebp - 0x134], 0x10b
jne 0x43e8f1
mov bl, 1
test bl, bl
je 0x43ea29
xor eax, eax
push ebp
push 0x43ea1f
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.0043e730
mov dword [ebp - 0x144], eax
call fcn.00402a90
mov eax, 9
call fcn.00403000
mov word [ebp - 0x108], ax
mov eax, 9
call fcn.00403000
mov word [ebp - 0x106], ax
push 0
push 0
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
je 0x43e973
push 0
lea eax, [ebp - 8]
push eax
push 0xf8
lea eax, [ebp - 0x14c]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_WriteFile_1
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 2], al
cmp word [ebp - 0x54], 0x5a4d
je 0x43e9b3
mov word [ebp - 0xe], 0x5a4d
push 0
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
je 0x43e9b3
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [ebp - 0xe]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_WriteFile_1
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 2], al
cmp byte [ebp - 1], 0
je 0x43ea15
mov eax, 0x200
call fcn.00403000
mov ebx, eax
shl ebx, 4
test ebx, ebx
jle 0x43ea15
push 2
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
je 0x43ea15
push ebx
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x43e7d8]
call fcn.00405888
add esp, 4
mov edx, ebx
mov eax, dword [ebp - 0x14]
call fcn.00406a60
push 0
lea eax, [ebp - 8]
push eax
push ebx
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_WriteFile_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x43ea29
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x43ea55
lea eax, [ebp - 0x14]
mov edx, dword [0x43e7d8]
call fcn.00405894
ret