Function at 0x4afd10
Capabilities:
Terminate process

Disassembly:
sub esp, 0xc
push ebx
push esi
push edi
mov esi, ecx
push ebp
mov edi, dword [esi + 4]
cmp dword [esi + 8], edi
je 0x4afd92
lea ebx, [edi - 0xc]
test edi, edi
je 0x4afd58
mov eax, dword [ebx + 4]
mov ecx, 0x24
sub eax, dword [ebx]
push 0
cdq
idiv ecx
push eax
call fcn.004afc90
add esp, 8
mov dword [edi], eax
mov ecx, dword [ebx + 4]
mov edx, dword [ebx]
push eax
push ecx
push edx
call fcn.004aff20
add esp, 0xc
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov ebx, dword [esi + 4]
mov edi, dword [esp + 0x20]
lea ebp, [ebx - 0xc]
cmp ebp, edi
je 0x4afd78
sub ebp, 0xc
sub ebx, 0xc
push ebp
mov ecx, ebx
call fcn.004affd0
cmp ebp, edi
jne 0x4afd66
mov ebp, dword [esp + 0x24]
mov ecx, edi
push ebp
call fcn.004affd0
add dword [esi + 4], 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret 8
sub edi, dword [esi]
mov ecx, 0xc
mov eax, edi
cdq
idiv ecx
test eax, eax
lea edi, [eax*2]
jne 0x4afdae
mov edi, 0x155
push 0
call dword [sym.imp.MSVCRT40.dll_void____cdecl___void____cdecl_set_new_handler_void____cdecl___void__]
add esp, 4
lea eax, [edi + edi*2]
shl eax, 2
mov dword [esp + 0x18], eax
push eax
call sub.MFC40.DLL_operator_new
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x4afdfc
mov edi, dword [sym.imp.MSVCRT40.dll_class_ostream____cdecl_endl_class_ostream__]
push 0x4fc498
mov ecx, dword [sym.imp.MSVCRT40.dll_class_ostream_withassign_cerr]
call dword [sym.imp.MSVCRT40.dll_public:_class_ostream____thiscall_ostream::operator___char_const__]
push eax
call edi
add esp, 4
push 1
call dword [sym.imp.MSVCRT40.dll_exit]
add esp, 4
mov ebx, dword [esp + 0x10]
mov ebp, dword [esi]
mov edi, dword [esp + 0x20]
cmp edi, ebp
je 0x4afe22
mov eax, ebp
mov ecx, ebx
add ebp, 0xc
add ebx, 0xc
test ecx, ecx
je 0x4afe1e
push eax
call fcn.004b0240
cmp edi, ebp
jne 0x4afe0a
mov eax, edi
mov ecx, 0xc
sub eax, dword [esi]
cdq
idiv ecx
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x10]
lea ebx, [eax + edx*4]
test ebx, ebx
je 0x4afe72
mov ebp, dword [esp + 0x24]
mov ecx, 0x24
push 0
mov eax, dword [ebp + 4]
sub eax, dword [ebp]
cdq
idiv ecx
push eax
call fcn.004afc90
add esp, 8
mov dword [ebx], eax
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
push eax
push ecx
push edx
call fcn.004aff20
add esp, 0xc
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov eax, edi
mov ecx, 0xc
sub eax, dword [esi]
mov ebp, dword [esi + 4]
cdq
idiv ecx
cmp edi, ebp
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x10]
lea ebx, [eax + edx*4 + 0xc]
je 0x4afea8
mov eax, edi
mov ecx, ebx
add edi, 0xc
add ebx, 0xc
test ecx, ecx
je 0x4afea4
push eax
call fcn.004b0240
cmp edi, ebp
jne 0x4afe90
mov eax, dword [esi + 4]
mov ebx, dword [esi]
mov dword [esp + 0x14], eax
cmp ebx, eax
je 0x4afee2
mov edi, dword [ebx + 4]
mov ebp, dword [ebx]
cmp ebp, edi
je 0x4afece
push 0
mov ecx, ebp
add ebp, 0x24
call fcn.004aff60
cmp ebp, edi
jne 0x4afebe
mov eax, dword [ebx]
add ebx, 0xc
push eax
call sub.MFC40.DLL_operator_delete
add esp, 4
cmp ebx, dword [esp + 0x14]
jne 0x4afeb5
mov eax, dword [esi]
push eax
call sub.MFC40.DLL_operator_delete
mov eax, dword [esp + 0x1c]
add esp, 4
mov ecx, 0xc
add eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
sub eax, dword [esi]
cdq
pop ebp
mov dword [esi], ebx
idiv ecx
pop edi
lea edx, [eax + eax*2]
lea eax, [ebx + edx*4]
add eax, ecx
mov dword [esi + 4], eax
pop esi
pop ebx
add esp, 0xc
ret 8