Function at 0x4215b0
Capabilities:
Create thread

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
test ebp, ebp
je 0x421829
mov ebx, dword [esp + 0x14]
test ebx, ebx
je 0x421829
push esi
push edi
push 0x21c
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
test esi, esi
je 0x4215ec
mov ecx, 0x87
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
jmp 0x4215ee
xor esi, esi
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov dword [esi + 4], ecx
mov dword [esi + 0x210], eax
mov eax, dword [esp + 0x28]
push 0x103
lea ecx, [esi + 8]
push ebx
push ecx
mov dword [esi], ebp
mov dword [esi + 0x214], edx
mov dword [esi + 0x218], eax
call edi
mov edx, dword [esp + 0x20]
push 0x103
lea eax, [esi + 0x10c]
push edx
push eax
call edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push ecx
push 0
push esi
push 0x421560
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [0x56fbf4]
mov dword [esp + 0x14], eax
mov eax, dword [0x56fbf0]
sub edx, eax
mov esi, eax
sar edx, 2
cmp edx, 1
jae 0x421774
mov edx, dword [0x56fbec]
test edx, edx
je 0x421697
mov ecx, eax
sub ecx, edx
sar ecx, 2
cmp ecx, 1
jbe 0x421697
mov ecx, eax
sub ecx, edx
sar ecx, 2
jmp 0x42169c
mov ecx, 1
test edx, edx
jne 0x4216a4
xor eax, eax
jmp 0x4216a9
sub eax, edx
sar eax, 2
add eax, ecx
test eax, eax
mov dword [esp + 0x2c], eax
jge 0x4216b5
xor eax, eax
lea edx, [eax*4]
push edx
call sub.MFC42.DLL_operatornew
mov ebx, dword [0x56fbec]
add esp, 4
mov ebp, eax
cmp ebx, esi
mov edi, ebp
je 0x4216e7
push ebx
push edi
call fcn.00414950
add ebx, 4
add esp, 8
add edi, 4
cmp ebx, esi
jne 0x4216d3
lea eax, [esp + 0x14]
mov ecx, 0x56fbe8
push eax
push 1
push edi
call fcn.00419b30
mov ecx, dword [0x56fbf0]
add edi, 4
push edi
push ecx
push esi
mov ecx, 0x56fbe8
call fcn.00480680
mov edx, dword [0x56fbf0]
mov eax, dword [0x56fbec]
push edx
push eax
mov ecx, 0x56fbe8
call fcn.0040d6e0
mov ecx, dword [0x56fbec]
push ecx
call sub.MFC42.DLL_operatordelete
mov edx, dword [esp + 0x30]
mov ecx, dword [0x56fbec]
add esp, 4
lea eax, [ebp + edx*4]
test ecx, ecx
mov dword [0x56fbf4], eax
jne 0x421750
xor eax, eax
jmp 0x42175a
mov eax, dword [0x56fbf0]
sub eax, ecx
sar eax, 2
pop edi
lea ecx, [ebp + eax*4 + 4]
mov dword [0x56fbec], ebp
pop esi
pop ebp
mov dword [0x56fbf0], ecx
mov eax, 1
pop ebx
ret
mov edx, eax
sub edx, esi
sar edx, 2
cmp edx, 1
jae 0x4217cf
lea ecx, [esi + 4]
push ecx
push eax
push esi
mov ecx, 0x56fbe8
call fcn.00480680
mov eax, dword [0x56fbf0]
lea edx, [esp + 0x14]
mov ecx, eax
push edx
sub ecx, esi
mov edx, 1
sar ecx, 2
sub edx, ecx
mov ecx, 0x56fbe8
push edx
push eax
call fcn.00419b30
mov ecx, dword [0x56fbf0]
mov eax, esi
cmp esi, ecx
je 0x421812
mov edx, dword [esp + 0x14]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jne 0x4217c0
jmp 0x421812
push eax
push eax
add eax, 0xfffffffc
mov ecx, 0x56fbe8
push eax
call fcn.00480680
mov eax, dword [0x56fbf0]
mov ecx, eax
add eax, 0xfffffffc
cmp esi, eax
je 0x4217fc
mov edx, dword [eax - 4]
sub eax, 4
sub ecx, 4
cmp eax, esi
mov dword [ecx], edx
jne 0x4217ed
lea ecx, [esi + 4]
mov eax, esi
cmp esi, ecx
je 0x421812
mov edx, dword [esp + 0x14]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jne 0x421805
mov eax, dword [0x56fbf0]
pop edi
add eax, 4
pop esi
mov dword [0x56fbf0], eax
pop ebp
mov eax, 1
pop ebx
ret
pop ebp
xor eax, eax
pop ebx
ret