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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
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 0x4077f8
xor eax, eax
jmp 0x407c73
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 0x40781e
xor eax, eax
jmp 0x407c73
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov cx, word [eax + 0x14]
cmp ecx, 0xe0
je 0x407836
xor eax, eax
jmp 0x407c73
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 0x407880
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 0x407880
xor eax, eax
jmp 0x407c73
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 0x4078b4
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 0x407904
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 0x4078ab
push 5
mov eax, dword [ebp - 0x10]
push eax
call fcn.004075d5
add esp, 8
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
cmp edx, dword [ecx + 0x34]
je 0x4079d7
cmp dword [ebp - 4], 0
je 0x4079d7
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 0x4079d7
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 0x4079cc
mov edx, dword [ebp - 0x28]
xor eax, eax
mov ax, word [edx]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
shr ecx, 0xc
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x13c], edx
cmp dword [ebp - 0x13c], 3
je 0x40799e
jmp 0x4079c1
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax]
mov edx, dword [ebp - 0x34]
and edx, 0xfff
add ecx, edx
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x34]
mov dword [edx], ecx
mov eax, dword [ebp - 0x28]
add eax, 2
mov dword [ebp - 0x28], eax
jmp 0x40796e
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], ecx
jmp 0x407951
push 1
mov edx, dword [ebp - 0x10]
push edx
call fcn.004075d5
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x407ad4
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax]
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x38]
cmp dword [edx], 0
je 0x407ad4
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax + 0xc]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x14]
add eax, dword [edx]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx + 0x10]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00407c77
add esp, 0x10
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x407a54
xor eax, eax
jmp 0x407c73
mov ecx, dword [ebp - 0x40]
cmp dword [ecx], 0
je 0x407ac6
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
and eax, 0x80000000
test eax, eax
je 0x407a88
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
and edx, 0xffff
push edx
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x4c], eax
jmp 0x407aaa
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x14]
add eax, dword [edx]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
add ecx, 2
push ecx
mov edx, dword [ebp - 0x44]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x4c], eax
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x4c]
mov dword [ecx], edx
mov eax, dword [ebp - 0x48]
add eax, 4
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x40]
add ecx, 4
mov dword [ebp - 0x40], ecx
jmp 0x407a54
mov edx, dword [ebp - 0x38]
add edx, 0x14
mov dword [ebp - 0x38], edx
jmp 0x4079fd
push 0
mov eax, dword [ebp - 0x10]
push eax
call fcn.004075d5
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x407c56
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx]
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x54], 0
jmp 0x407b0c
mov eax, dword [ebp - 0x54]
add eax, 1
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x54]
cmp edx, dword [ecx + 0x14]
jae 0x407c56
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax + 0x1c]
mov edx, dword [ebp - 0x54]
lea eax, [ecx + edx*4]
mov dword [ebp - 0x138], eax
mov ecx, dword [ebp - 0x138]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x58]
jb 0x407b54
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x58]
add edx, dword [ecx + 4]
cmp dword [ebp - 0x5c], edx
jb 0x407b56
jmp 0x407b03
push 0x2e
mov eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
mov dword [ebp - 0x130], eax
mov ecx, dword [ebp - 0x130]
sub ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x134], ecx
cmp dword [ebp - 0x130], 0
je 0x407b8f
cmp dword [ebp - 0x134], 0xc8
jb 0x407b94
jmp 0x407b03
mov edx, dword [ebp - 0x134]
push edx
mov eax, dword [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x124]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x134]
mov byte [ebp + edx - 0x124], 0
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x124]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00407c77
add esp, 0x10
mov dword [ebp - 0x128], eax
cmp dword [ebp - 0x128], 0
jne 0x407bed
xor eax, eax
jmp 0x407c73
mov ecx, dword [ebp - 0x130]
add ecx, 1
mov dword [ebp - 0x12c], ecx
mov edx, dword [ebp - 0x12c]
movsx eax, byte [edx]
cmp eax, 0x23
jne 0x407c23
mov ecx, dword [ebp - 0x12c]
add ecx, 1
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [ebp - 0x12c], eax
mov edx, dword [ebp - 0x12c]
push edx
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x407c51
mov edx, dword [ebp - 0x5c]
sub edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x138]
mov dword [eax], edx
jmp 0x407b03
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x28], 0
je 0x407c6e
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
add eax, dword [edx + 0x28]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x14], eax
mov eax, 1
mov esp, ebp
pop ebp
ret