Function at 0x40804d
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 0x408074
xor eax, eax
jmp 0x408531
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 0x40809a
xor eax, eax
jmp 0x408531
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov cx, word [eax + 0x14]
cmp ecx, 0xe0
je 0x4080b2
xor eax, eax
jmp 0x408531
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 0x4080fc
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 0x4080fc
xor eax, eax
jmp 0x408531
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 0x408130
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 0x408180
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 0x408127
push 5
mov eax, dword [ebp - 0x10]
push eax
call fcn.00407e51
add esp, 8
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
cmp edx, dword [ecx + 0x34]
je 0x408295
cmp dword [ebp - 4], 0
je 0x408295
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 0x408295
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 0x40828a
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 0x408236
cmp dword [ebp - 0x144], 0xa
je 0x40825a
jmp 0x40827c
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 0x40827c
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 0x4081ee
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], edx
jmp 0x4081cd
push 1
mov eax, dword [ebp - 0x10]
push eax
call fcn.00407e51
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x408392
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 0x408392
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.00408535
add esp, 0x10
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x408312
xor eax, eax
jmp 0x408531
mov edx, dword [ebp - 0x48]
cmp dword [edx], 0
je 0x408384
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
and ecx, 0x80000000
test ecx, ecx
je 0x408346
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 0x408368
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 0x408312
mov eax, dword [ebp - 0x40]
add eax, 0x14
mov dword [ebp - 0x40], eax
jmp 0x4082bb
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00407e51
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x408514
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 0x4083ca
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 0x408514
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 0x408412
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x60]
add eax, dword [edx + 4]
cmp dword [ebp - 0x64], eax
jb 0x408414
jmp 0x4083c1
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 0x40844d
cmp dword [ebp - 0x13c], 0xc8
jb 0x408452
jmp 0x4083c1
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.00408535
add esp, 0x10
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0
jne 0x4084ab
xor eax, eax
jmp 0x408531
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 0x4084e1
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 0x40850f
mov eax, dword [ebp - 0x64]
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x140]
mov dword [ecx], eax
jmp 0x4083c1
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x28], 0
je 0x40852c
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