Function at 0x40972d
Capabilities:
Allocate or change rwx memory
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x5a4d
je 0x409754
xor eax, eax
jmp 0x409c11
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov eax, dword [ebp - 0xc]
add edx, dword [eax + 0x3c]
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 0x10]
xor edx, edx
mov dx, word [ecx + 0x18]
cmp edx, 0x10b
je 0x40977a
xor eax, eax
jmp 0x409c11
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov cx, word [eax + 0x14]
cmp ecx, 0xe0
je 0x409792
xor eax, eax
jmp 0x409c11
push 0x40
push 0x3000
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x50]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4097dc
push 0x40
push 0x3000
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x50]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4097dc
xor eax, eax
jmp 0x409c11
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x54]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov dword [ebp - 8], 0
jmp 0x409810
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x10]
xor edx, edx
mov dx, word [ecx + 6]
cmp dword [ebp - 8], edx
jae 0x409860
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov cx, word [eax + 0x14]
mov edx, dword [ebp - 0x10]
lea eax, [edx + ecx + 0x18]
mov ecx, dword [ebp - 8]
imul ecx, ecx, 0x28
add eax, ecx
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x18]
add edx, dword [eax + 0x14]
push edx
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx + 0xc]
push edx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
jmp 0x409807
push 5
mov eax, dword [ebp - 0x10]
push eax
call fcn.00409531
add esp, 8
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
cmp edx, dword [ecx + 0x34]
je 0x409975
cmp dword [ebp - 4], 0
je 0x409975
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
add eax, dword [edx]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x20]
add edx, dword [ecx + 4]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x1c]
jae 0x409975
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
add edx, dword [ecx + 4]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x20]
add eax, 8
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
cmp ecx, dword [ebp - 0x2c]
jae 0x40996a
mov edx, dword [ebp - 0x28]
xor eax, eax
mov ax, word [edx]
and eax, 0xfff
mov word [ebp - 0x34], ax
mov ecx, dword [ebp - 0x28]
xor edx, edx
mov dx, word [ecx]
sar edx, 0xc
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x144], eax
cmp dword [ebp - 0x144], 3
je 0x409916
cmp dword [ebp - 0x144], 0xa
je 0x40993a
jmp 0x40995c
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx]
mov eax, dword [ebp - 0x34]
and eax, 0xffff
add edx, eax
mov dword [ebp - 0x38], edx
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx]
add edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
mov dword [eax], edx
jmp 0x40995c
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx]
mov eax, dword [ebp - 0x34]
and eax, 0xffff
add edx, eax
mov dword [ebp - 0x3c], edx
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ecx]
add edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x3c]
mov dword [eax], edx
mov ecx, dword [ebp - 0x28]
add ecx, 2
mov dword [ebp - 0x28], ecx
jmp 0x4098ce
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], edx
jmp 0x4098ad
push 1
mov eax, dword [ebp - 0x10]
push eax
call fcn.00409531
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x409a72
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
cmp dword [eax], 0
je 0x409a72
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx + 0xc]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x14]
add eax, dword [edx + 0x10]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x44]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00409c15
add esp, 0x10
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4099f2
xor eax, eax
jmp 0x409c11
mov edx, dword [ebp - 0x48]
cmp dword [edx], 0
je 0x409a64
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
and ecx, 0x80000000
test ecx, ecx
je 0x409a26
mov edx, dword [ebp - 0x48]
mov eax, dword [edx]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x54], eax
jmp 0x409a48
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax]
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x58]
add edx, 2
push edx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov dword [edx], eax
mov ecx, dword [ebp - 0x50]
add ecx, 4
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x48]
add edx, 4
mov dword [ebp - 0x48], edx
jmp 0x4099f2
mov eax, dword [ebp - 0x40]
add eax, 0x14
mov dword [ebp - 0x40], eax
jmp 0x40999b
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00409531
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x409bf4
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
add eax, dword [edx]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], 0
jmp 0x409aaa
mov ecx, dword [ebp - 0x5c]
add ecx, 1
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x5c]
cmp eax, dword [edx + 0x14]
jae 0x409bf4
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx + 0x1c]
mov eax, dword [ebp - 0x5c]
lea ecx, [edx + eax*4]
mov dword [ebp - 0x140], ecx
mov edx, dword [ebp - 0x140]
mov eax, dword [ebp - 0x14]
add eax, dword [edx]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
cmp ecx, dword [ebp - 0x60]
jb 0x409af2
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x60]
add eax, dword [edx + 4]
cmp dword [ebp - 0x64], eax
jb 0x409af4
jmp 0x409aa1
push 0x2e
mov ecx, dword [ebp - 0x64]
push ecx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
mov dword [ebp - 0x138], eax
mov edx, dword [ebp - 0x138]
sub edx, dword [ebp - 0x64]
mov dword [ebp - 0x13c], edx
cmp dword [ebp - 0x138], 0
je 0x409b2d
cmp dword [ebp - 0x13c], 0xc8
jb 0x409b32
jmp 0x409aa1
mov eax, dword [ebp - 0x13c]
push eax
mov ecx, dword [ebp - 0x64]
push ecx
lea edx, [ebp - 0x12c]
push edx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x13c]
mov byte [ebp + eax - 0x12c], 0
mov ecx, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x12c]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00409c15
add esp, 0x10
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0
jne 0x409b8b
xor eax, eax
jmp 0x409c11
mov edx, dword [ebp - 0x138]
add edx, 1
mov dword [ebp - 0x134], edx
mov eax, dword [ebp - 0x134]
movsx ecx, byte [eax]
cmp ecx, 0x23
jne 0x409bc1
mov edx, dword [ebp - 0x134]
add edx, 1
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x134]
push eax
mov ecx, dword [ebp - 0x130]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
je 0x409bef
mov eax, dword [ebp - 0x64]
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x140]
mov dword [ecx], eax
jmp 0x409aa1
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x28], 0
je 0x409c0c
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax + 0x28]
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x14], ecx
mov eax, 1
mov esp, ebp
pop ebp
ret