Function at 0x1004f140
Capabilities:
Resolve function by parsing pe exports
Terminate process

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, dword [esp + 0x34]
push edi
xor edi, edi
cmp dword [esi + 8], edi
jne 0x103b05e0
mov edx, dword [esi + 0x6c]
mov eax, dword [esi + 0x70]
sub eax, edx
cmp eax, dword [esp + 0x3c]
jge 0x1004f1c1
mov edi, dword [esi + 0x64]
test edi, edi
je 0x1004f193
mov ecx, dword [esi + 0x68]
mov eax, ecx
sub eax, dword [esi + 0x70]
cmp eax, dword [esi + 0x74]
jae 0x1004f193
sub ecx, edx
push ecx
lea eax, [edi + edx]
push eax
push edi
call dword [sym.imp.MSVCR110.dll_memmove]
mov eax, dword [esi + 0x6c]
sub dword [esi + 0x70], eax
add esp, 0xc
and dword [esi + 0x6c], 0
mov ecx, dword [esi + 0x68]
mov edx, dword [esi + 0x74]
mov eax, ecx
sub eax, dword [esi + 0x70]
cmp eax, edx
jb 0x1004f1c9
mov eax, dword [esi + 0x68]
sub eax, dword [esi + 0x70]
mov ecx, dword [esi]
push eax
mov eax, dword [esi + 0x64]
add eax, dword [esi + 0x70]
push eax
push esi
call dword [ecx + 4]
add esp, 0xc
cmp eax, 0xffffffff
je 0x1004f1c1
add dword [esi + 0x70], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp dword [esi + 0x30], 0
lea eax, [ecx + edx]
mov dword [esi + 0x68], eax
jne 0x103b07af
push 0
push eax
push dword [esi + 0x64]
call sym.php5.dll__erealloc
add esp, 0xc
mov dword [esi + 0x64], eax
jmp 0x1004f1a2
push dword [esi + 0x74]
lea eax, [esp + 0x30]
mov ebp, edi
lea ebx, [esp + 0x28]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x18], eax
mov dword [esi + 0x6c], edi
mov dword [esi + 0x70], edi
call sym.php5.dll__emalloc
pop ecx
mov ecx, eax
mov dword [esp + 0x18], ecx
cmp dword [esi + 0x78], edi
jne 0x103b07a0
test ebp, ebp
jne 0x103b07a0
mov eax, dword [esi + 0x70]
sub eax, dword [esi + 0x6c]
cmp eax, dword [esp + 0x3c]
jge 0x103b07a0
push dword [esi + 0x74]
mov eax, dword [esi]
push ecx
push esi
call dword [eax + 4]
add esp, 0xc
mov dword [esp + 0x1c], eax
test eax, eax
je 0x103b0673
cmp eax, 0xffffffff
je 0x103b0673
push ebp
push ebp
push eax
push dword [esp + 0x24]
push esi
call sym.php5.dll_php_stream_bucket_new
add esp, 0x14
push eax
push ebx
call sym.php5.dll_php_stream_bucket_append
pop ecx
pop ecx
xor ebx, ebx
jmp 0x103b067c
xor ebx, ebx
cmp dword [esi + 0x78], ebx
setne bl
inc ebx
mov ebp, dword [esi + 8]
jmp 0x103b06b7
mov eax, dword [ebp]
push ebx
push 0
push dword [esp + 0x1c]
push dword [esp + 0x44]
push ebp
push esi
call dword [eax]
mov edi, eax
add esp, 0x18
cmp edi, 2
jne 0x103b06bb
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x14]
and dword [ecx], 0
and dword [ecx + 4], 0
mov ebp, dword [ebp + 8]
mov dword [esp + 0x38], eax
mov dword [esp + 0x14], ecx
test ebp, ebp
jne 0x103b0681
sub edi, 0
je 0x103b0773
dec edi
je 0x103b076b
dec edi
jne 0x103b077b
mov ebx, dword [esp + 0x38]
jmp 0x103b075f
mov ecx, dword [esi + 0x68]
mov edx, dword [edi + 0x10]
mov eax, ecx
sub eax, dword [esi + 0x70]
cmp eax, edx
jae 0x103b0736
cmp dword [esi + 0x30], 0
lea eax, [edx + ecx]
mov dword [esi + 0x68], eax
je 0x103b0725
push eax
push dword [esi + 0x64]
call dword [sym.imp.MSVCR110.dll_realloc]
pop ecx
pop ecx
test eax, eax
jne 0x103b0733
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 1
call dword [sym.imp.MSVCR110.dll_exit]
push 0
push eax
push dword [esi + 0x64]
call sym.php5.dll__erealloc
add esp, 0xc
mov dword [esi + 0x64], eax
push dword [edi + 0x10]
mov eax, dword [esi + 0x64]
push dword [edi + 0xc]
add eax, dword [esi + 0x70]
push eax
call sub.MSVCR110.dll_memcpy
mov eax, dword [edi + 0x10]
add dword [esi + 0x70], eax
add esp, 0xc
push edi
call sym.php5.dll_php_stream_bucket_unlink
pop ecx
push edi
call sym.php5.dll_php_stream_bucket_delref
pop ecx
mov edi, dword [ebx]
test edi, edi
jne 0x103b06db
jmp 0x103b077b
mov eax, dword [esp + 0x1c]
test eax, eax
jmp 0x103b0786
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x103b07a0
cmp eax, 0xffffffff
je 0x103b07a0
xor edi, edi
cmp dword [esi + 0x78], edi
jne 0x103b07a0
mov ebx, dword [esp + 0x38]
mov ecx, dword [esp + 0x18]
mov ebp, dword [esp + 0x20]
jmp 0x103b0624
push dword [esp + 0x18]
call sym.php5.dll__efree
pop ecx
jmp 0x1004f1c1
push eax
push dword [esi + 0x64]
call dword [sym.imp.MSVCR110.dll_realloc]
pop ecx
pop ecx
test eax, eax
jne 0x1004f1e7
jmp 0x103b0706