Function at 0x10021c60
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
cmp dword [esi + 4], 0
je 0x10021d8a
mov edx, dword [esp + 0x28]
mov ecx, edx
and ecx, 4
je 0x10021d6d
mov ebx, dword [esi + 0xc]
mov eax, ebx
and eax, dword [esi + 4]
lea ebp, [eax*4]
mov eax, dword [esi + 0x1c]
mov edi, dword [eax + ebp]
test edi, edi
jne 0x10021e02
cmp byte [esi + 0x24], 0
push 0x24
jne 0x10021e62
call sym.php5.dll__emalloc
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x20]
mov dword [edi + 0x20], 0
mov dword [edi + 4], 0
mov dword [edi], ebx
cmp eax, 4
jne 0x10021e25
mov eax, dword [esp + 0x1c]
lea ecx, [edi + 0xc]
mov eax, dword [eax]
mov dword [ecx], eax
mov dword [edi + 8], ecx
mov ecx, dword [esp + 0x24]
test ecx, ecx
jne 0x10021d76
mov eax, dword [esi + 0x1c]
mov eax, dword [eax + ebp]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], 0
test eax, eax
jne 0x10021e1d
mov eax, dword [sym.php5.dll_zend_block_interruptions]
test eax, eax
jne 0x10021ed4
mov eax, dword [esi + 0x1c]
mov dword [eax + ebp], edi
mov eax, dword [esi + 0x18]
mov dword [edi + 0x14], eax
mov dword [edi + 0x10], 0
mov eax, dword [esi + 0x18]
test eax, eax
je 0x10021d85
mov dword [eax + 0x10], edi
cmp dword [esi + 0x10], 0
mov dword [esi + 0x18], edi
je 0x10021d80
mov eax, dword [sym.php5.dll_zend_unblock_interruptions]
test eax, eax
jne 0x10021edb
cmp ebx, dword [esi + 0xc]
jl 0x10021d58
cmp ebx, 0x7fffffff
jae 0x10021ee2
inc ebx
mov dword [esi + 0xc], ebx
inc dword [esi + 8]
mov eax, dword [esi + 8]
cmp eax, dword [esi]
ja 0x10021e54
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov ebx, dword [esp + 0x18]
jmp 0x10021c84
mov eax, dword [edi + 8]
mov dword [ecx], eax
jmp 0x10021ceb
mov dword [esi + 0x10], edi
jmp 0x10021d36
mov dword [esi + 0x14], edi
jmp 0x10021d2d
cmp byte [esi + 0x24], 0
jne 0x10021e8c
mov eax, dword [sym.php5.dll_zend_block_interruptions]
mov ebx, dword [esi]
test eax, eax
jne 0x10021ebb
xor eax, eax
mov ecx, ebx
shld eax, ecx, 2
shl ecx, 2
test eax, eax
jne 0x10397ade
cmp ecx, 0xffffffff
ja 0x10397ade
push ecx
call sym.php5.dll__emalloc
mov edi, eax
add esp, 4
test edi, edi
je 0x10397af9
lea eax, [ebx*4]
push eax
push 0
push edi
call sub.MSVCR110.dll_memset
mov eax, dword [sym.php5.dll_zend_unblock_interruptions]
add esp, 0xc
test eax, eax
jne 0x10021ec2
mov ebx, edi
mov eax, dword [esi]
dec eax
mov dword [esi + 0x1c], ebx
mov dword [esi + 4], eax
jmp 0x10021c72
cmp dword [edi + 4], 0
jne 0x10021e10
cmp dword [edi], ebx
je 0x10397b0b
mov edi, dword [edi + 0x18]
test edi, edi
je 0x10021c9e
jmp 0x10021e02
mov dword [eax + 0x1c], edi
jmp 0x10021d03
cmp byte [esi + 0x24], 0
push eax
jne 0x10021e7a
call sym.php5.dll__emalloc
add esp, 4
push dword [esp + 0x20]
mov dword [edi + 8], eax
push dword [esp + 0x20]
push eax
call sub.MSVCR110.dll_memcpy
add esp, 0xc
mov dword [edi + 0xc], 0
jmp 0x10021cdf
mov ecx, esi
call fcn.100341c0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
call dword [sym.imp.MSVCR110.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x10021cb4
jmp 0x10397b9c
call dword [sym.imp.MSVCR110.dll_malloc]
add esp, 4
test eax, eax
jne 0x10021e34
jmp 0x10397b9c
mov edi, dword [esi]
push 0
push 4
push edi
call sym.php5.dll__safe_malloc
lea ecx, [edi*4]
push ecx
mov ebx, eax
push 0
push ebx
call sub.MSVCR110.dll_memset
mov eax, dword [esi]
add esp, 0x18
dec eax
mov dword [esi + 0x1c], ebx
mov dword [esi + 4], eax
jmp 0x10021c72
call eax
jmp 0x10021da3
call eax
mov eax, dword [esi]
mov ebx, edi
dec eax
mov dword [esi + 0x1c], ebx
mov dword [esi + 4], eax
jmp 0x10021c72
call eax
jmp 0x10021d10
call eax
jmp 0x10021d43
mov ebx, bind
jmp 0x10021d55
push 0
push 4
push ebx
push str.Possible_integer_overflow_in_memory_allocation___zu___zu___zu_
push 1
call sym.php5.dll_zend_error
add esp, 0x14
xor ecx, ecx
jmp 0x10021dbf
mov eax, dword [sym.php5.dll_zend_unblock_interruptions]
test eax, eax
je 0x10397b04
call eax
xor ebx, ebx
jmp 0x10021df4
test ecx, ecx
jne 0x10397c22
test dl, 2
jne 0x10397c22
mov eax, dword [sym.php5.dll_zend_block_interruptions]
test eax, eax
je 0x10397b27
call eax
mov eax, dword [esi + 0x20]
test eax, eax
je 0x10397b36
push dword [edi + 8]
call eax
add esp, 4
mov ebx, dword [esp + 0x20]
mov eax, dword [edi + 8]
cmp ebx, 4
jne 0x10397b81
lea ebx, [edi + 0xc]
cmp eax, ebx
je 0x10397b71
cmp byte [esi + 0x24], 0
push eax
je 0x10397b69
call dword [sym.imp.MSVCR110.dll_free]
mov eax, dword [esp + 0x20]
add esp, 4
mov eax, dword [eax]
mov dword [ebx], eax
mov dword [edi + 8], ebx
jmp 0x10397c01
call sym.php5.dll__efree
add esp, 4
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
mov dword [ebx], eax
mov dword [edi + 8], ebx
jmp 0x10397c01
lea ebp, [edi + 0xc]
cmp eax, ebp
jne 0x10397bcd
cmp byte [esi + 0x24], 0
push ebx
je 0x10397bbc
call dword [sym.imp.MSVCR110.dll_malloc]
add esp, 4
test eax, eax
jne 0x10397bc4
push str.Out_of_memory_n
call dword [sym.imp.MSVCR110.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 8
push 1
call dword [sym.imp.MSVCR110.dll_exit]
call sym.php5.dll__emalloc
add esp, 4
mov dword [ebp], 0
jmp 0x10397bf0
cmp byte [esi + 0x24], 0
je 0x10397be4
push ebx
push eax
call dword [sym.imp.MSVCR110.dll_realloc]
add esp, 8
test eax, eax
jne 0x10397bf0
jmp 0x10397b9c
push 0
push ebx
push eax
call sym.php5.dll__erealloc
add esp, 0xc
push ebx
push dword [esp + 0x20]
mov dword [edi + 8], eax
push eax
call sub.MSVCR110.dll_memcpy
add esp, 0xc
mov eax, dword [sym.php5.dll_zend_unblock_interruptions]
test eax, eax
je 0x10397c0c
call eax
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x10021d66
mov eax, dword [edi + 8]
mov dword [ecx], eax
jmp 0x10021d66
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret