Function at 0x409fdd
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 0x40a004
xor eax, eax
jmp 0x40a4c1
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 0x40a02a
xor eax, eax
jmp 0x40a4c1
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov cx, word [eax + 0x14]
cmp ecx, 0xe0
je 0x40a042
xor eax, eax
jmp 0x40a4c1
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 0x40a08c
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 0x40a08c
xor eax, eax
jmp 0x40a4c1
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 0x40a0c0
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 0x40a110
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 0x40a0b7
push 5
mov eax, dword [ebp - 0x10]
push eax
call fcn.00409de1
add esp, 8
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
cmp edx, dword [ecx + 0x34]
je 0x40a225
cmp dword [ebp - 4], 0
je 0x40a225
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 0x40a225
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 0x40a21a
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 0x40a1c6
cmp dword [ebp - 0x144], 0xa
je 0x40a1ea
jmp 0x40a20c
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 0x40a20c
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 0x40a17e
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], edx
jmp 0x40a15d
push 1
mov eax, dword [ebp - 0x10]
push eax
call fcn.00409de1
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40a322
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 0x40a322
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.0040a4c5
add esp, 0x10
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x40a2a2
xor eax, eax
jmp 0x40a4c1
mov edx, dword [ebp - 0x48]
cmp dword [edx], 0
je 0x40a314
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
and ecx, 0x80000000
test ecx, ecx
je 0x40a2d6
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 0x40a2f8
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 0x40a2a2
mov eax, dword [ebp - 0x40]
add eax, 0x14
mov dword [ebp - 0x40], eax
jmp 0x40a24b
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00409de1
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40a4a4
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 0x40a35a
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 0x40a4a4
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 0x40a3a2
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x60]
add eax, dword [edx + 4]
cmp dword [ebp - 0x64], eax
jb 0x40a3a4
jmp 0x40a351
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 0x40a3dd
cmp dword [ebp - 0x13c], 0xc8
jb 0x40a3e2
jmp 0x40a351
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.0040a4c5
add esp, 0x10
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0
jne 0x40a43b
xor eax, eax
jmp 0x40a4c1
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 0x40a471
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 0x40a49f
mov eax, dword [ebp - 0x64]
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x140]
mov dword [ecx], eax
jmp 0x40a351
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x28], 0
je 0x40a4bc
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