Function at 0x10016674
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
cmp byte [ebp + 0x10], 0
push ebx
push esi
push edi
mov ebx, edx
push 0
mov dword [esp + 0x30], ebx
pop esi
je 0x10016768
mov dword [esp + 0x24], 0x2004
cmp dword [esp + 0x24], 0x236d
jle 0x10016724
push 0xb19
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edi, esi
mov dword [esp + 0x20], esi
mov ebx, esi
mov dword [esp + 0x1c], esi
mov eax, edi
mov edi, esi
cdq
idiv ebx
mov ebx, edx
mov ecx, edi
mov eax, ebx
shl eax, cl
lea ecx, [esp + 0x30]
cdq
push edx
push eax
call fcn.10001a94
pop ecx
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x100166e2
mov eax, dword [eax]
push eax
call fcn.10048785
pop ecx
push esi
push 1
lea ecx, [esp + 0x38]
call fcn.10003cd4
inc edi
cmp edi, 0x6c9f
jl 0x100166c6
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
inc ebx
mov dword [esp + 0x1c], ebx
cmp ebx, 0x38b7
jl 0x100166bd
inc edi
mov dword [esp + 0x20], edi
cmp edi, 0x2d9c
jl 0x100166b7
mov ebx, dword [esp + 0x2c]
mov edx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x34]
mov ecx, dword [edx]
mov eax, dword [edi]
cmp dword [eax + ecx*4], esi
jne 0x1001673c
mov eax, dword [edx]
mov eax, dword [ebp + 0x30]
mov eax, dword [eax]
mov eax, dword [edx]
mov ecx, dword [edx]
xor edx, edx
mov eax, dword [edi]
cmp dword [eax + ecx*4], esi
setl dl
mov dword [ebx], edx
cmp dword [esp + 0x24], 0x1f77
jge 0x100168b5
push str.bedslr_vtcdpwt_cceaph_non_xcatpthk_jofuuh_fwgkxs
call fcn.10048785
pop ecx
jmp 0x100168b5
mov dword [esp + 0x2c], 0x25dd
cmp dword [esp + 0x2c], 0x4b1
jge 0x100168a1
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x1c]
push eax
push str._ld__ld__ld__ld
call fcn.100483db
mov eax, dword [esp + 0x24]
add esp, 0x14
mov edx, dword [esp + 0xc]
add eax, edx
add eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
add eax, ecx
jne 0x100167c8
push 0x1006bbd4
call fcn.10048c11
mov edx, dword [esp + 0x10]
pop ecx
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x10], 0
mov ebx, esi
mov edi, esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], esi
jl 0x100167f1
mov edx, esi
add edx, ebx
inc ebx
lea eax, [edx + ebx]
cmp eax, dword [esp + 0x10]
jle 0x100167dd
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0xc]
test ecx, ecx
js 0x10016809
mov edx, esi
add edx, edi
inc edi
lea eax, [edx + edi]
cmp eax, ecx
jle 0x100167f7
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x10016822
test edx, edx
jne 0x10016822
and dword [esp + 0x2c], edx
cmp dword [esp + 0x10], edx
cmove ebx, dword [esp + 0x2c]
test ecx, ecx
jne 0x1001682f
test eax, eax
jne 0x1001682f
test edx, edx
cmove edi, eax
lea eax, [edi + ebx]
mov ecx, edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
imul ecx, ebx
add eax, edx
cmp ecx, eax
jne 0x10016859
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x10]
jne 0x10016859
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x18]
je 0x10016899
push str.Impossible
call fcn.10048c11
jmp 0x10016894
dec eax
mov dword [esp + 0x1c], eax
cmp edx, edi
jl 0x10016885
push 0x1006bbd4
call fcn.10048785
mov edx, dword [esp + 0x10]
sub edx, edi
dec ebx
mov dword [esp + 0x10], edx
jmp 0x10016898
push 0x1006bbe4
call fcn.10048785
sub dword [esp + 0x18], ebx
dec edi
mov edx, dword [esp + 0x10]
pop ecx
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x10016865
mov eax, dword [ebp + 0x2c]
mov dword [eax], esi
cmp dword [eax], esi
jl 0x100168b5
mov ecx, dword [ebp + 0x24]
dec dword [ecx]
dec dword [eax]
cmp dword [eax], esi
jge 0x100168ad
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret