Function at 0x10002ae0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, dword [sym.imp.MSVCRT.dll_calloc]
mov esi, eax
lea ebx, [esi + esi]
push 4
push ebx
call edi
add esp, 8
mov dword [ebp - 8], eax
test eax, eax
jne 0x10002b0b
push 1
call dword [sym.imp.MSVCRT.dll_exit]
push 4
push ebx
call edi
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x10002b22
push 1
call dword [sym.imp.MSVCRT.dll_exit]
push 4
push ebx
call edi
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x10002b38
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, esi
test esi, esi
je 0x10002b56
mov edi, edi
mov edi, dword [ebp + 0x10]
dec eax
cmp dword [edi + eax*4], 0
jne 0x10002b50
test eax, eax
jne 0x10002b40
jmp 0x10002b56
inc eax
mov dword [ebp - 0xc], eax
jne 0x10002b76
cmp esi, 1
jbe 0x10002b68
mov edi, dword [ebp + 8]
add edi, 4
lea ecx, [esi - 1]
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov dword [eax], 1
jmp 0x10002c5b
mov edx, dword [edi + eax*4 - 4]
mov ecx, 0x80000000
nop
test ecx, edx
jne 0x10002b88
shr ecx, 1
jne 0x10002b80
cmp ecx, 1
jne 0x10002b9a
dec eax
mov dword [ebp - 4], 0x80000000
mov dword [ebp - 0xc], eax
jmp 0x10002b9f
shr ecx, 1
mov dword [ebp - 4], ecx
test esi, esi
je 0x10002bc1
mov ecx, dword [ebp + 0xc]
mov eax, ebx
sub ecx, ebx
mov edx, esi
lea esp, [esp]
mov edi, dword [ecx + eax]
mov dword [eax], edi
add eax, 4
dec edx
jne 0x10002bb0
mov edi, dword [ebp + 0x10]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x10002c43
lea ecx, [edi + eax*4 - 4]
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp - 8]
push esi
push ebx
push edx
call fcn.100022f0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
push eax
lea edi, [esi + esi]
push edi
push ecx
push ebx
push edx
mov eax, esi
call fcn.10001fe0
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
test dword [ebp - 4], ecx
je 0x10002c20
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
push esi
push ebx
push edx
call fcn.10001da0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
push eax
push edi
push ecx
push ebx
push edx
mov eax, esi
call fcn.10001fe0
mov eax, 1
cmp dword [ebp - 4], eax
jne 0x10002c3a
sub dword [ebp - 0xc], eax
sub dword [ebp + 0x10], 4
mov dword [ebp - 4], 0x80000000
jmp 0x10002c3d
shr dword [ebp - 4], 1
cmp dword [ebp - 0xc], 0
jne 0x10002bd0
test esi, esi
je 0x10002c5b
mov eax, dword [ebp + 8]
mov ecx, ebx
sub ecx, eax
mov edx, esi
mov edi, dword [ecx + eax]
mov dword [eax], edi
add eax, 4
dec edx
jne 0x10002c50
lea eax, [esi + esi]
test eax, eax
je 0x10002c6f
mov ecx, dword [ebp - 8]
dec eax
mov dword [ecx + eax*4], 0
jne 0x10002c62
mov eax, dword [ebp - 8]
mov edx, dword [eax]
mov edi, dword [sym.imp.MSVCRT.dll_free]
mov dword [ebp + 8], edx
mov ecx, dword [ebp + 8]
push eax
call edi
lea eax, [esi + esi]
add esp, 4
test eax, eax
je 0x10002c9d
lea ecx, [ecx]
mov edx, dword [ebp - 0x10]
dec eax
mov dword [edx + eax*4], 0
jne 0x10002c90
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
mov dword [ebp + 8], ecx
mov edx, dword [ebp + 8]
push eax
call edi
add esp, 4
test esi, esi
je 0x10002cbc
dec esi
mov dword [ebx + esi*4], 0
jne 0x10002cb2
mov eax, dword [ebx]
mov dword [ebp + 8], eax
mov ecx, dword [ebp + 8]
push ebx
call edi
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10