Function at 0x1000420d
Capabilities:
Create thread

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xac
mov esi, edx
mov ebx, ecx
lea eax, [esp + 0x45]
push eax
push 0x1a
push 0x1000865a
push 0x10008640
call fcn.100048d0
add esp, 0x10
mov ebp, eax
mov ecx, dword [ebx + 0x444]
mov edx, esi
push 0
call fcn.10003f97
pop ecx
test eax, eax
je 0x100043d5
mov edi, eax
mov dword [esp + 4], ebp
mov dword [esp], esi
mov ebp, dword [eax + 0xc]
push ebp
call sub.msvcrt.dll_malloc
pop ecx
mov esi, eax
push ebp
push dword [edi + 8]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov ecx, esi
mov edx, ebp
push dword [ebx + 0x44c]
push dword [ebx + 0x448]
call fcn.10004896
pop eax
pop ecx
push 0x38
call sub.msvcrt.dll_malloc
pop ecx
test eax, eax
je 0x100043f7
mov edi, eax
mov eax, dword [esp + 0xd4]
mov ecx, dword [esp + 0xd0]
mov edx, dword [esp + 0xd8]
mov dword [edi], 2
mov dword [edi + 4], edx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], ebx
and dword [edi + 0x18], 0
and dword [edi + 0x1c], 0
push 0x34
call sub.msvcrt.dll_malloc
pop ecx
mov dword [edi + 0x14], eax
test eax, eax
je 0x100043f0
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ebx
mov edi, esi
mov dword [eax], 0x10004693
mov dword [eax + 4], 0x100046b0
mov dword [eax + 8], 0x100046c8
mov dword [eax + 0xc], 0x100046e0
mov dword [eax + 0x10], 0x10004701
mov dword [eax + 0x14], 0x10004718
mov dword [eax + 0x18], 0x10004791
mov dword [eax + 0x20], sub.msvcrt.dll_malloc
mov dword [eax + 0x1c], sub.msvcrt.dll_calloc
mov dword [eax + 0x24], sub.msvcrt.dll_realloc
mov dword [eax + 0x28], sub.msvcrt.dll_free
mov dword [eax + 0x2c], sub.msvcrt.dll_memset
mov dword [eax + 0x30], sub.msvcrt.dll_memcpy
lea eax, [esp + 0x1c]
push eax
push 7
push 0x10008662
push 0x1000865b
call fcn.100048d0
add esp, 0x10
mov ebx, eax
mov dword [esp + 8], ebp
lea esi, [ebp - 7]
xor ebp, ebp
cmp esi, ebp
je 0x100043d9
lea eax, [edi + ebp]
push 7
push ebx
push eax
call sub.msvcrt.dll_memcmp
add esp, 0xc
inc ebp
test eax, eax
jne 0x10004363
test edi, edi
je 0x100043d9
lea ebx, [edi + ebp]
dec ebx
mov eax, dword [esp + 0xc]
mov dword [ebx], eax
mov ecx, dword [esp + 0xc0]
mov dword [eax + 0x20], ecx
lea eax, [ecx*4 + 4]
push eax
call sub.msvcrt.dll_malloc
pop ecx
mov ecx, dword [ebx]
mov dword [ecx + 0x24], eax
xor esi, esi
cmp dword [esp + 0xc0], esi
je 0x1000441c
mov eax, dword [esp + 0xc4]
mov eax, dword [eax + esi*4]
test eax, eax
je 0x100043c8
push eax
call sub.msvcrt.dll__strdup
pop ecx
jmp 0x100043ca
xor eax, eax
mov ecx, dword [ebx]
mov ecx, dword [ecx + 0x24]
mov dword [ecx + esi*4], eax
inc esi
jmp 0x100043a8
xor ebx, ebx
jmp 0x1000440f
xor edx, edx
inc edx
mov ecx, dword [esp + 0x10]
push dword [esp + 4]
call fcn.100036dd
pop eax
xor ebx, ebx
mov esi, edi
jmp 0x10004408
push edi
call sub.msvcrt.dll_free
pop eax
xor edx, edx
inc edx
mov ecx, ebx
push dword [esp + 4]
call fcn.100036dd
pop eax
xor ebx, ebx
push esi
call sub.msvcrt.dll_free
pop eax
mov eax, ebx
add esp, 0xac
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebx]
mov eax, dword [eax + 0x24]
mov ecx, dword [esp + 0xc0]
and dword [eax + ecx*4], 0
mov eax, dword [ebx]
mov ecx, dword [esp + 0xc8]
mov dword [eax + 0x28], ecx
mov eax, dword [ebx]
and dword [eax + 0x2c], 0
mov eax, dword [ebx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x1000446a
push eax
call sub.msvcrt.dll_malloc
pop ecx
mov ecx, dword [ebx]
mov dword [ecx + 0x2c], eax
mov eax, dword [ebx]
push dword [eax + 0x28]
push dword [esp + 0xd0]
push dword [eax + 0x2c]
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [edi + ebp + 7]
test eax, eax
je 0x10004497
push eax
call sub.msvcrt.dll_malloc
pop ecx
mov ecx, dword [edi + ebp - 1]
mov dword [ecx + 0x30], eax
mov eax, dword [edi + ebp - 1]
push dword [edi + ebp + 7]
push 0
push dword [eax + 0x30]
call sub.msvcrt.dll_memset
add esp, 0xc
jmp 0x1000449d
mov eax, dword [ebx]
and dword [eax + 0x30], 0
mov esi, edi
push 0xc
pop edi
push edi
call sub.msvcrt.dll_malloc
pop ecx
mov ebp, eax
push edi
push ebx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push 0x28
call sub.msvcrt.dll_malloc
pop ecx
mov edi, eax
mov ebx, dword [esp + 0x10]
mov dword [eax], ebx
mov eax, dword [esp + 0xc]
mov dword [edi + 4], eax
mov dword [edi + 0x1c], ebp
mov ebp, dword [esp + 0xd8]
mov dword [edi + 8], ebp
push dword [esp]
call sub.msvcrt.dll__strdup
pop ecx
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], esi
mov ecx, dword [esp + 8]
mov dword [edi + 0x14], ecx
and dword [edi + 0x20], 0
and dword [edi + 0x18], 0
mov al, byte [esp + 0xdc]
mov dword [esp + 4], edi
mov byte [edi + 0x24], al
mov edi, ecx
mov eax, esi
test ebp, ebp
je 0x10004544
mov eax, dword [ebx + 0x1c]
cmp eax, ebp
jbe 0x10004520
mov eax, dword [ebx + 0x18]
mov edi, ecx
mov ecx, dword [esp + 4]
jmp 0x1000453e
lea ecx, [eax + eax]
mov dword [ebx + 0x1c], ecx
shl eax, 3
push eax
push dword [ebx + 0x18]
call sub.msvcrt.dll_realloc
pop ecx
pop edx
mov dword [ebx + 0x18], eax
mov ecx, dword [esp + 4]
mov edi, dword [ecx + 0x14]
mov dword [eax + ebp*4], ecx
mov eax, dword [ecx + 0x10]
mov dword [esp], eax
lea eax, [esp + 0x85]
push eax
push 0x27
push 0x10008607
push 0x100085e0
call fcn.100048d0
add esp, 0x10
mov dword [esp + 0xc], eax
lea eax, [esp + 0x5f]
push eax
push 0x26
push 0x10008636
push 0x10008610
call fcn.100048d0
add esp, 0x10
mov dword [esp + 0x14], eax
push 0x20
push 0x3000
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x1000464e
mov ebp, eax
lea eax, [esp + 0x1c]
push eax
push 4
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10004627
mov eax, dword [esp + 4]
mov dword [eax + 0x10], ebp
push edi
push dword [esp + 4]
push ebp
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
push 0x20
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10004627
lea eax, [esp + 0x18]
push eax
push 0
push dword [esp + 0xc]
push 0x10004157
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
test eax, eax
jne 0x1000467e
push 0x8000
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [esp]
call sub.msvcrt.dll_free
pop eax
xor edx, edx
inc edx
mov ecx, dword [esp + 0x10]
push dword [esp + 0x14]
call fcn.100036dd
pop eax
jmp 0x1000467e
push 0x8000
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [esp]
call sub.msvcrt.dll_free
pop eax
xor edx, edx
inc edx
mov ecx, ebx
push dword [esp + 0xc]
call fcn.100036dd
jmp 0x1000467b
lea eax, [esp + 0x1c]
push eax
push 0x28
push 0x100085d8
push 0x100085b0
call fcn.100048d0
add esp, 0x10
xor edx, edx
inc edx
mov ecx, ebx
push eax
call fcn.100036dd
pop eax
push dword [esp]
call sub.msvcrt.dll_free
pop eax
xor ebx, ebx
mov eax, dword [esp + 8]
push eax
push 0
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
jmp 0x10004408