Function at 0x406d98
Capabilities:
Enumerate pe sections
Parse pe header
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x409fb0
push 0x408ed0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ecx
sub esp, 0x124
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
and dword [ebp - 0x38], 0
and dword [ebp - 0x2c], 0
and dword [ebp - 0x28], 0
and dword [ebp - 0x70], 0
and dword [ebp - 0x24], 0
and dword [ebp - 0x3c], 0
and dword [ebp - 0x34], 0
and dword [ebp - 0x1c], 0
and dword [ebp - 0x8c], 0
and dword [ebp - 0x6c], 0
or dword [ebp - 0x68], 0xffffffff
and dword [ebp - 0x30], 0
and dword [ebp - 0x90], 0
and dword [ebp - 0x20], 0
and dword [ebp - 4], 0
push dword [ebp + 8]
call fcn.00406ce5
cmp eax, 1
jne 0x406e17
jmp 0x40741f
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0xffffffff
jne 0x406e40
jmp 0x40741f
push 0
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0x68]
call fcn.0040640b
push 2
push 0
push 0
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x24], eax
push 0
push 0
push 0
push 4
push 0
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x406e84
jmp 0x40741f
push 0x400
push 0
push 0
push 0xf001f
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x406eb1
mov eax, dword [ebp - 0x28]
movzx eax, word [eax]
cmp eax, 0x5a4d
je 0x406eb6
jmp 0x40741f
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x28]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x90], ecx
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x24]
cmp dword [ebp - 0x90], eax
jae 0x406eee
mov eax, dword [ebp - 0x90]
cmp eax, dword [ebp - 0x28]
jbe 0x406eee
mov eax, dword [ebp - 0x90]
movzx eax, word [eax]
cmp eax, 0x4550
je 0x406ef3
jmp 0x40741f
mov eax, dword [ebp - 0x90]
movzx eax, word [eax + 6]
dec eax
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x90]
lea eax, [ecx + eax + 0xf8]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
movzx eax, word [eax + 0x22]
movzx ecx, word [0x40be6c]
cmp eax, ecx
jl 0x406f28
jmp 0x40741f
mov eax, dword [ebp - 0x20]
movzx eax, word [eax + 0x22]
test eax, eax
je 0x406fbe
mov eax, dword [ebp - 0x20]
movzx eax, word [eax + 0x22]
movzx ecx, word [0x40be6c]
cmp eax, ecx
jge 0x406fbe
mov dword [ebp - 0x2c], 1
mov eax, dword [ebp - 0x90]
movzx eax, word [eax + 6]
dec eax
mov ecx, dword [ebp - 0x90]
mov word [ecx + 6], ax
mov eax, dword [ebp - 0x90]
cmp dword [eax + 0x1c], 0
je 0x406f89
mov eax, dword [ebp - 0x90]
mov ecx, dword [ebp - 0x20]
mov eax, dword [eax + 0x1c]
sub eax, dword [ecx + 8]
mov ecx, dword [ebp - 0x90]
mov dword [ecx + 0x1c], eax
mov eax, dword [ebp - 0x90]
mov ecx, dword [ebp - 0x20]
mov ecx, dword [ecx + 4]
mov dword [eax + 0x28], ecx
mov eax, dword [ebp - 0x90]
mov ecx, dword [ebp - 0x20]
mov eax, dword [eax + 0x50]
sub eax, dword [ecx + 8]
mov ecx, dword [ebp - 0x90]
mov dword [ecx + 0x50], eax
push 0x400
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov eax, dword [ebp - 0x90]
movzx eax, word [eax + 6]
imul eax, eax, 0x28
add eax, 0xf8
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x90]
add eax, dword [ebp - 0x3c]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x2c], 0
jne 0x407019
and dword [ebp - 0x38], 0
jmp 0x406ff2
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0xa
jge 0x40700e
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x1c]
add ecx, dword [eax]
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x70]
add eax, 4
mov dword [ebp - 0x70], eax
jmp 0x406feb
cmp dword [ebp - 0x1c], 0
je 0x407019
jmp 0x40741f
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x90]
movzx eax, word [eax + 6]
dec eax
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x90]
lea eax, [ecx + eax + 0xf8]
mov dword [ebp - 0x20], eax
push 0x28
push 0
lea eax, [ebp - 0x64]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x64], 0x63742e
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x90]
push dword [eax + 0x38]
mov eax, dword [0x40dc80]
add eax, 0x297
push eax
call fcn.00406b6c
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x90]
push dword [eax + 0x38]
mov eax, dword [ebp - 0x20]
push dword [eax + 8]
call fcn.00406b6c
mov ecx, dword [ebp - 0x20]
add eax, dword [ecx + 0xc]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x90]
push dword [eax + 0x3c]
mov eax, dword [0x40dc80]
add eax, 0x297
push eax
call fcn.00406b6c
mov dword [ebp - 0x54], eax
and dword [ebp - 0x138], 0
push 0x4c
push 0
lea eax, [ebp - 0x134]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
and dword [ebp - 0xe0], 0
push 0x4c
push 0
lea eax, [ebp - 0xdc]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
and dword [ebp - 0x2c], 0
mov dword [ebp - 0x38], 1
jmp 0x407103
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x90]
movzx eax, word [eax + 6]
cmp dword [ebp - 0x38], eax
jg 0x407170
mov eax, dword [ebp - 0x90]
movzx eax, word [eax + 6]
sub eax, dword [ebp - 0x38]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x90]
lea eax, [ecx + eax + 0xf8]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x10], 0
je 0x40716e
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x14]
mov ecx, dword [ebp - 0x20]
add eax, dword [ecx + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp + ecx*4 - 0x138], eax
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x38]
mov dword [ebp + eax*4 - 0xe0], ecx
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x2c], eax
jmp 0x4070fc
and dword [ebp - 0x13c], 0
mov eax, dword [ebp - 0x138]
mov dword [ebp - 0x1c], eax
and dword [ebp - 0x38], 0
jmp 0x40718d
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x2c]
jge 0x4071b3
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp + eax*4 - 0x138]
jbe 0x4071b1
mov eax, dword [ebp - 0x38]
mov eax, dword [ebp + eax*4 - 0x138]
mov dword [ebp - 0x1c], eax
jmp 0x407186
and dword [ebp - 0x38], 0
jmp 0x4071c0
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x2c]
jge 0x4071eb
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp + eax*4 - 0x138]
jne 0x4071e9
mov eax, dword [ebp - 0x38]
mov eax, dword [ebp + eax*4 - 0xe0]
mov dword [ebp - 0x13c], eax
jmp 0x4071eb
jmp 0x4071b9
cmp dword [ebp - 0x13c], 0
jne 0x4071fe
mov dword [ebp - 0x13c], 1
mov eax, dword [ebp - 0x90]
movzx eax, word [eax + 6]
sub eax, dword [ebp - 0x13c]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x90]
lea eax, [ecx + eax + 0xf8]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x90]
push dword [eax + 0x3c]
mov eax, dword [ebp - 0x20]
push dword [eax + 0x10]
call fcn.00406b6c
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
add ecx, dword [eax + 0x14]
mov dword [ebp - 0xe4], ecx
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0xe4]
mov dword [ebp - 0xe8], eax
cmp dword [ebp - 0x1c], 0
je 0x40726c
xor eax, eax
sub eax, dword [ebp - 0xe8]
mov dword [ebp - 0xe8], eax
jmp 0x40727b
mov eax, dword [ebp - 0xe4]
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp - 0xe4]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x40], 0xe0000020
mov ax, word [0x40be6c]
mov word [ebp - 0x42], ax
push 0x28
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebp - 0x90]
add eax, dword [ebp - 0x3c]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x90]
movzx eax, word [eax + 6]
inc eax
mov ecx, dword [ebp - 0x90]
mov word [ecx + 6], ax
mov eax, dword [ebp - 0x90]
cmp dword [eax + 0x1c], 0
je 0x4072e3
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x1c]
add eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x90]
mov dword [ecx + 0x1c], eax
mov eax, dword [ebp - 0x90]
mov ecx, dword [ebp - 0x58]
mov dword [eax + 0x28], ecx
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x50]
add eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x90]
mov dword [ecx + 0x50], eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 0x28], 0
and dword [ebp - 0x30], 0
push 2
push 0
mov eax, dword [ebp - 0xe8]
add eax, dword [ebp - 0x54]
push eax
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 2
push 0
xor eax, eax
sub eax, dword [ebp - 0x54]
push eax
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x34]
push eax
push 0x297
push 0x409ba8
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x34]
push eax
push dword [0x40dc80]
push dword [0x40dc74]
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 1
push 0
xor eax, eax
sub eax, dword [0x40dc80]
sub eax, 0x2b
push eax
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x34]
push eax
push 4
push 0x40dc80
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x58]
add eax, 0x297
mov ecx, dword [ebp - 0x8c]
sub ecx, eax
mov dword [ebp - 0x6c], ecx
push 2
push 0
xor eax, eax
sub eax, dword [ebp - 0x54]
push eax
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push 0
push 0x293
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x34]
push eax
push 4
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 1
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0x68]
call fcn.0040640b
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x68], 0xffffffff
cmp dword [ebp - 0x28], 0
je 0x40742e
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x30], 0
je 0x40743d
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x68], 0xffffffff
je 0x40744c
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
jmp 0x40748a
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4