Function at 0x819440
Capabilities:
Terminate process

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x48
mov eax, dword [esp + 0x60]
mov ebp, dword [esp + 0x64]
mov edi, edx
mov dword [esp + 4], eax
mov eax, dword [ecx + 8]
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], ecx
mov esi, dword [ebx + 0x18]
call fcn.007fb640
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dl, byte [ebp]
mov ecx, dword [edi + 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 0x10], ebp
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x34], edi
mov edi, esi
mov ebp, dword [ebp + 4]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x40], ecx
mov byte [esp + 3], dl
test eax, eax
je 0x8194c6
mov edx, 0xc
mov ecx, esi
push eax
push dword [ebx + 0xc]
call fcn.007d10d0
add esp, 8
mov ecx, esi
mov edx, edi
call fcn.007f7790
mov edx, dword [ebx + 0x10]
mov ecx, esi
call fcn.007fbd70
mov dl, byte [esp + 3]
mov eax, dword [ebx + 8]
cmp dl, 0xd
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ebp
ja 0x8194f4
movzx eax, dl
mov ecx, 0x2600
bt ecx, eax
jae 0x8194f4
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], 0
mov eax, dword [eax + 8]
jmp 0x819527
mov ebp, dword [esp + 0x1c]
mov ecx, ebp
call fcn.007fcfa0
mov dword [esp + 0x30], eax
mov ecx, ebp
mov al, byte [esp + 3]
or al, 2
cmp al, 0xe
jne 0x81951e
call fcn.007fcfa0
mov dword [esp + 4], 0
jmp 0x819527
mov edx, dword [esp + 4]
call fcn.007fa700
mov dword [esp + 0xc], eax
mov eax, dword [esp + 8]
mov eax, dword [eax]
sub eax, dword [ebx + 4]
test byte [ebx + 0x20], 1
mov dword [esp + 8], eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x44], ebx
je 0x8195f9
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0x2c]
mov edi, dword [ecx + 0x28]
inc eax
lea edx, [edi + 1]
mov dword [ecx + 0x2c], eax
mov dword [ecx + 0x28], edx
mov dword [esp + 0x2c], eax
cmp dword [ebx + 0x10], 0
jne 0x81956c
xor ebp, ebp
jmp 0x81957a
mov ecx, esi
mov edx, 0x11
call fcn.007f75b0
mov ebp, eax
mov ebx, dword [esp + 4]
mov eax, dword [esp + 8]
mov ecx, esi
mov edx, 0x72
lea eax, [ebx + eax + 1]
push eax
push dword [esp + 0x30]
mov dword [esp + 0x1c], edi
push edi
call fcn.007d10f0
add esp, 0xc
test ebp, ebp
je 0x8195ac
mov ecx, esi
mov edx, ebp
call fcn.007f75c0
mov ecx, esi
mov edx, 0x23
push dword [esp + 0x3c]
mov edi, dword [esp + 0x1c]
push edi
call fcn.007d10d0
add esp, 8
mov dword [esp + 0x38], eax
mov ecx, esi
mov eax, dword [esp + 0x34]
mov edx, dword [eax + 0xc]
push dword [esp + 0x20]
call fcn.0081c1d0
add esp, 4
mov ecx, esi
mov edx, 0x7d
push dword [esp + 0x14]
push dword [esp + 0x30]
push edi
call fcn.007d10f0
add esp, 0xc
xor eax, eax
jmp 0x819634
mov ecx, esi
mov edx, 0x24
push edi
mov edi, dword [esp + 0x1c]
push edi
call fcn.007d10d0
add esp, 8
mov dword [esp + 0x38], eax
mov ecx, esi
mov eax, dword [esp + 0x34]
mov edx, dword [eax + 0xc]
push dword [esp + 0x20]
call fcn.0081c1d0
add esp, 4
mov dword [esp + 0x14], edi
mov eax, 1
mov ebx, dword [esp + 4]
add eax, dword [esp + 8]
test ebx, ebx
mov dword [esp + 8], eax
mov ebx, dword [esp + 0x40]
jle 0x8196a8
mov eax, dword [esp + 8]
mov edx, dword [esp + 4]
lea edi, [eax - 1]
xor eax, eax
lea ecx, [eax + eax*4]
cmp word [ebx + ecx*4 + 0x14], 1
adc edi, 0
inc eax
cmp eax, edx
jne 0x819651
mov ebx, dword [esp + 0x14]
mov eax, edx
mov edx, dword [esp + 0x40]
lea esi, [eax - 1]
lea ecx, [esi + esi*4]
movzx edx, word [edx + ecx*4 + 0x14]
xor ecx, ecx
test edx, edx
lea ebp, [edx - 1]
mov edx, 0x59
sete cl
cmove ebp, edi
sub edi, ecx
mov ecx, dword [esp + 0xc]
lea eax, [eax + ecx - 1]
mov ecx, dword [esp + 0x24]
push eax
push ebp
push ebx
call fcn.007d10f0
add esp, 0xc
test esi, esi
mov eax, esi
jg 0x819668
mov cl, byte [esp + 3]
mov esi, dword [esp + 0x24]
mov ebp, dword [esp + 0x30]
mov eax, ecx
add al, 0xf7
cmp al, 5
ja case.0x8196c3.243
movzx eax, al
jmp dword [eax*4 + 0xb59de4]
mov ebx, dword [esp + 0xc]
mov ecx, esi
mov edx, 0x59
push ebx
push dword [esp + 0xc]
push dword [esp + 0x1c]
call fcn.007d10f0
add esp, 0xc
mov ecx, esi
mov edx, 0x78
push ebp
mov edi, dword [esp + 0x2c]
push edi
call fcn.007d10d0
add esp, 8
mov ecx, esi
mov edx, 0x79
push ebp
push ebx
push edi
call fcn.007d10f0
add esp, 0xc
mov ecx, esi
mov edx, 8
call fcn.0078e010
mov cl, byte [esp + 3]
jmp case.0x8196c3.246
mov edi, dword [esp + 4]
mov ecx, esi
mov edx, 0x5b
push edi
mov eax, dword [esp + 0x14]
push dword [eax + 0x10]
push ebp
push edi
mov ebx, dword [esp + 0x1c]
push ebx
call fcn.007f75d0
add esp, 0x14
mov ecx, esi
mov edx, 0x83
push edi
push ebx
push ebp
push dword [esp + 0x34]
call fcn.0078dfd0
mov cl, byte [esp + 0x13]
add esp, 0x10
jmp case.0x8196c3.246
mov ecx, esi
mov edx, 0x50
push dword [esp + 4]
mov eax, dword [esp + 0x14]
push dword [eax + 8]
call fcn.007d10d0
mov cl, byte [esp + 0xb]
add esp, 8
jmp case.0x8196c3.246
mov eax, dword [esp + 0x10]
mov ecx, esi
mov edx, 0xe
push dword [eax + 4]
call fcn.007f9600
mov cl, byte [esp + 7]
add esp, 4
mov ebx, dword [esp + 0x44]
mov edi, dword [esp + 0x1c]
test ebp, ebp
je 0x8197d0
cmp cl, 0xb
jne 0x8197bc
mov edx, dword [esp + 0xc]
mov ecx, edi
push dword [esp + 4]
call fcn.007faa50
add esp, 4
jmp 0x8197c7
mov edx, dword [esp + 0xc]
mov ecx, edi
call fcn.007fc440
mov ecx, edi
mov edx, ebp
call fcn.007fc440
mov ebp, dword [esp + 0x38]
mov edx, dword [esp + 0x20]
mov ecx, esi
inc ebp
call fcn.007fbd70
test byte [ebx + 0x20], 1
mov edi, dword [esp + 0x3c]
mov ecx, esi
je 0x8197f3
mov edx, 3
jmp 0x8197f8
mov edx, 5
push ebp
push dword [esp + 0x1c]
call fcn.007d10d0
add esp, 8
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x81981c
mov ecx, esi
mov edx, 0x41
push eax
call fcn.007f9600
add esp, 4
mov ecx, esi
mov edx, edi
add esp, 0x48
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.007fbd70