Function at 0x41bbdf
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
cmp dword [ebp + 8], 0
jne 0x41bc04
mov dword [esp + 4], 0
mov dword [esp], 0x57
call fcn.0041d3b7
jmp 0x41be26
mov eax, dword [ebp + 0xc]
sub eax, 1
and eax, dword [ebp + 0xc]
test eax, eax
je 0x41bc2a
mov dword [esp + 4], 0
mov dword [esp], 0x32
call fcn.0041d3b7
jmp 0x41be26
cmp dword [ebp + 0xc], 0xfffffff
jbe 0x41bc4c
mov dword [esp + 4], 0
mov dword [esp], 0x32
call fcn.0041d3b7
jmp 0x41be26
cmp dword [ebp + 0x14], 0x7fefffff
jbe 0x41bc6e
mov dword [esp + 4], 0
mov dword [esp], 0x216
call fcn.0041d3b7
jmp 0x41be26
mov dword [ebp - 0x1c], 0x10
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
cmp edx, eax
cmovae eax, edx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x14]
add eax, 0x320
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, edx
sub eax, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x14], eax
jae 0x41bcb6
mov dword [esp], str._MCF_thread_new_aligned
call fcn.0041d804
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.0041d016
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x41bce3
mov dword [esp + 4], 0
mov dword [esp], 8
call fcn.0041d3b7
jmp 0x41be26
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 2
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov dword [eax], edx
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 8]
mov dword [eax + 0xc], edx
cmp dword [ebp + 0x14], 0
je 0x41bdb1
mov eax, dword [ebp - 0x18]
lea edx, [eax + 0x320]
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
je 0x41bd8f
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x10]
lea edx, [eax - 1]
mov eax, dword [ebp - 0xc]
sub eax, 1
or eax, edx
add eax, 1
mov edx, eax
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x10]
mov edx, eax
mov eax, dword [ebp + 0x14]
add edx, eax
mov eax, dword [ebp - 0x18]
sub edx, eax
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x14], eax
jae 0x41bd67
mov dword [esp], str._MCF_thread_new_aligned
call fcn.0041d804
mov eax, dword [0x4b5100]
mov edx, dword [ebp - 0x14]
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x10
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.DLL_HeapReAlloc]
call eax
sub esp, 0x10
cmp dword [ebp + 0x10], 0
je 0x41bdb1
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x10]
mov edx, dword [ebp + 0x14]
mov dword [esp + 8], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0041cee4
lea eax, [ebp - 0x34]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x18]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x41bb1b
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.DLL_CreateThread]
call eax
sub esp, 0x18
mov edx, dword [ebp - 0x18]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 8]
test eax, eax
jne 0x41be0a
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.0041d119
mov eax, 0
jmp 0x41be26
mov eax, dword [ebp - 0x34]
mov edx, eax
mov eax, dword [ebp - 0x18]
add eax, 4
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], edx
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
mov dword [eax], edx
mov eax, dword [ebp - 0x18]
leave
ret