Function at 0x408fb3
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
push esi
and dword [ebp - 0xc], 0
and dword [ebp - 4], 0
and dword [ebp - 0x10], 0
and dword [ebp - 0x14], 0
and dword [ebp - 0x18], 0
push 0x40
push 0x3000
mov eax, dword [ebp + 0xc]
shl eax, 4
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x408ff7
xor eax, eax
jmp 0x4093a2
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
shl eax, 4
push eax
push 0
push dword [ebp - 4]
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
movsx eax, byte [eax]
test eax, eax
je 0x409266
push 0x41c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x1c], eax
push 0x41c
push 0
push dword [ebp - 0x1c]
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x410e14
push dword [ebp - 0x10]
call dword [sym.imp.MSVCRT.dll_strstr]
pop ecx
pop ecx
test eax, eax
jne 0x409083
mov eax, dword [ebp - 0x1c]
mov dword [eax], 1
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40921c
mov dword [ebp - 0x2c], 1
and dword [ebp - 0x20], 0
and dword [ebp - 0x30], 0
and dword [ebp - 0x24], 0
and dword [ebp - 0x28], 0
push dword [ebp - 0x10]
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x2e
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
pop ecx
pop ecx
and dword [eax], 0
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x10]
call fcn.00408f2f
mov eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
shl eax, 2
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x28], eax
and dword [ebp - 0x78], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x74], eax
jmp 0x409108
mov eax, dword [ebp - 0x78]
inc eax
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x74]
inc eax
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x30]
ja 0x40911e
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x74]
mov dword [ecx + eax*4], edx
jmp 0x4090fa
mov dword [ebp - 0x7c], 1
jmp 0x40912e
mov eax, dword [ebp - 0x7c]
inc eax
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x7c]
cmp eax, dword [ebp - 0x24]
jae 0x4091c5
and dword [ebp - 0x80], 0
and dword [ebp - 0x84], 0
call dword [sym.imp.MSVCRT.dll_rand]
mov ecx, dword [ebp - 0x24]
dec ecx
sub ecx, dword [ebp - 0x7c]
inc ecx
xor edx, edx
div ecx
add edx, dword [ebp - 0x7c]
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx + eax*4]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x80]
mov esi, dword [ebp - 0x28]
mov edx, dword [esi + edx*4]
mov dword [ecx + eax*4], edx
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x84]
mov dword [ecx + eax*4], edx
mov eax, dword [ebp - 0x24]
dec eax
cmp dword [ebp - 0x7c], eax
jne 0x4091c0
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x28]
mov ecx, dword [edx + ecx*4]
mov dword [eax], ecx
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x84]
mov dword [ecx + eax*4], edx
jmp 0x4091c5
jmp 0x409127
cmp dword [ebp - 0x2c], 1
jne 0x4091d4
and dword [ebp - 0x2c], 0
jmp 0x40911e
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x1c]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 0x14], ecx
mov eax, dword [ebp - 0x24]
shl eax, 2
push eax
push dword [ebp - 0x28]
mov eax, dword [ebp - 0x1c]
add eax, 0x18
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x94], eax
push dword [ebp - 0x94]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x14], 0
jne 0x409230
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
jmp 0x40924e
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0x414], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x418], ecx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + eax + 1]
mov dword [ebp - 0x10], eax
jmp 0x409017
and dword [ebp - 8], 0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x409394
and dword [ebp - 0x88], 0
mov eax, dword [ebp - 8]
cmp dword [eax], 1
jne 0x4092a4
mov eax, dword [ebp - 8]
add eax, 4
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x88], eax
jmp 0x4092f6
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
mov ecx, dword [ebp - 8]
push dword [ecx + eax*4 + 0x14]
mov eax, dword [ebp - 8]
add eax, 4
push eax
push str._s._d
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
mov ecx, dword [ebp - 8]
and dword [ecx + eax*4 + 0x14], 0
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
dec eax
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x14], eax
mov eax, dword [ebp - 8]
cmp dword [eax + 0x14], 0
jne 0x4092f6
mov eax, dword [ebp - 8]
mov dword [ebp - 0x88], eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 1]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x418]
mov dword [ebp - 8], eax
cmp dword [ebp - 0x88], 0
je 0x40938f
mov eax, dword [ebp - 0x88]
cmp eax, dword [ebp - 0x14]
jne 0x409338
mov eax, dword [ebp - 0x88]
mov eax, dword [eax + 0x418]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x88]
cmp dword [eax + 0x414], 0
je 0x40935c
mov eax, dword [ebp - 0x88]
mov eax, dword [eax + 0x414]
mov ecx, dword [ebp - 8]
mov dword [eax + 0x418], ecx
cmp dword [ebp - 8], 0
je 0x409377
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x88]
mov ecx, dword [ecx + 0x414]
mov dword [eax + 0x414], ecx
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x98], eax
push dword [ebp - 0x98]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x409270
cmp dword [ebp - 0x14], 0
je 0x40939f
jmp 0x40926a
mov eax, dword [ebp - 0xc]
pop esi
leave
ret 8