Function at 0x10356ba0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
xor ebx, ebx
inc ebx
cmp dword [esi + 0x18], 0
push edi
je 0x10356bcb
push 0
push 0x20
push ebx
call sym.php5.dll__safe_malloc
add esp, 0xc
mov edx, eax
push 8
pop ecx
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
jmp 0x10356bd7
push 0x20
push ebx
call sym.php5.dll__ecalloc
pop ecx
pop ecx
mov edx, eax
mov ebp, dword [esp + 0x18]
mov dword [ebp], edx
cmp dword [esi + 0x18], 0
je 0x10356bfe
push 0
push 0x20
push ebx
call sym.php5.dll__safe_malloc
add esp, 0xc
mov edx, eax
push 8
pop ecx
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
jmp 0x10356c0a
push 0x20
push ebx
call sym.php5.dll__ecalloc
pop ecx
pop ecx
mov edx, eax
mov edi, dword [esp + 0x1c]
mov dword [edi], edx
cmp dword [ebp], 0
je 0x10356cfa
test edx, edx
je 0x10356d30
cmp dword [esi + 0x18], 0
push dword [esp + 0x20]
je 0x10356c57
call dword [sym.imp.MSVCR110.dll_malloc]
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x10356c5f
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]
pop ecx
pop ecx
push ebx
call dword [sym.imp.MSVCR110.dll_exit]
call sym.php5.dll__emalloc
pop ecx
mov ecx, eax
mov eax, dword [ebp]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp]
mov ecx, dword [esp + 0x20]
mov dword [eax + 0x10], ecx
mov eax, dword [ebp]
push ecx
push dword [esi + 0xc]
push dword [eax + 0xc]
call sub.MSVCR110.dll_memcpy
mov eax, dword [ebp]
add esp, 0xc
mov dword [eax + 0x1c], ebx
mov eax, dword [ebp]
mov dword [eax + 0x14], ebx
mov ecx, dword [ebp]
mov eax, dword [esi + 0x18]
mov ebp, dword [esp + 0x20]
mov dword [ecx + 0x18], eax
mov ecx, dword [esi + 0x10]
mov eax, dword [edi]
sub ecx, ebp
mov dword [eax + 0x10], ecx
cmp dword [esi + 0x18], 0
mov eax, dword [edi]
push dword [eax + 0x10]
je 0x10356cc1
call dword [sym.imp.MSVCR110.dll_malloc]
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x10356cc9
jmp 0x10356c39
call sym.php5.dll__emalloc
pop ecx
mov ecx, eax
mov eax, dword [edi]
mov dword [eax + 0xc], ecx
mov ecx, dword [edi]
mov eax, dword [esi + 0xc]
push dword [ecx + 0x10]
add eax, ebp
push eax
push dword [ecx + 0xc]
call sub.MSVCR110.dll_memcpy
mov eax, dword [edi]
add esp, 0xc
mov dword [eax + 0x1c], ebx
mov eax, dword [edi]
mov dword [eax + 0x14], ebx
mov ecx, dword [edi]
mov eax, dword [esi + 0x18]
mov dword [ecx + 0x18], eax
xor eax, eax
jmp 0x10356d6d
test edx, edx
je 0x10356d30
mov eax, dword [edx + 0xc]
test eax, eax
je 0x10356d1a
cmp dword [esi + 0x18], 0
push eax
je 0x10356d14
call dword [sym.imp.MSVCR110.dll_free]
jmp 0x10356d19
call sym.php5.dll__efree
pop ecx
cmp dword [esi + 0x18], 0
push dword [edi]
je 0x10356d2a
call dword [sym.imp.MSVCR110.dll_free]
jmp 0x10356d2f
call sym.php5.dll__efree
pop ecx
mov eax, dword [ebp]
test eax, eax
je 0x10356d6a
mov eax, dword [eax + 0xc]
test eax, eax
je 0x10356d53
cmp dword [esi + 0x18], 0
push eax
je 0x10356d4d
call dword [sym.imp.MSVCR110.dll_free]
jmp 0x10356d52
call sym.php5.dll__efree
pop ecx
cmp dword [esi + 0x18], 0
push dword [ebp]
je 0x10356d64
call dword [sym.imp.MSVCR110.dll_free]
jmp 0x10356d69
call sym.php5.dll__efree
pop ecx
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret