Function at 0x47e3c0
Capabilities:
Terminate process

Disassembly:
sub esp, 0xd38
push ebx
push ebp
mov ebp, dword [esp + 0xd48]
mov ebx, dword [ebp + 0x504]
mov edx, dword [ebp + 0x508]
xor eax, eax
cmp ebx, eax
push esi
mov esi, dword [ebp + 0x510]
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
jle 0x47e409
mov ecx, ebx
mov eax, 0xffffff38
lea edi, [esp + 0x138]
rep stosd dword es:[edi], eax
test ebx, ebx
jle 0x47e44b
mov eax, 0xffffff38
mov ecx, ebx
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
xor eax, eax
test ebx, ebx
mov ecx, ebx
lea edi, [esp + 0x23c]
rep stosd dword es:[edi], eax
jle 0x47e44b
mov eax, 1
mov ecx, ebx
lea edi, [esp + 0x340]
rep stosd dword es:[edi], eax
or eax, 0xffffffff
mov ecx, ebx
lea edi, [esp + 0x444]
rep stosd dword es:[edi], eax
test ebx, ebx
jne 0x47e474
mov eax, dword [esp + 0xd54]
mov ecx, dword [esp + 0xd58]
push esi
push edx
push eax
push ecx
mov eax, edx
lea edi, [esp + 0x558]
xor ecx, ecx
call fcn.0047dd70
add esp, 0x10
jmp 0x47e4d3
lea eax, [ebx - 1]
xor esi, esi
test eax, eax
jle 0x47e87e
lea edi, [esp + 0x548]
jmp 0x47e490
mov edx, dword [esp + 0x20]
mov eax, dword [ebp + esi*4 + 4]
mov ecx, dword [esp + 0xd54]
push edx
mov edx, dword [esp + 0xd5c]
push eax
mov eax, dword [ebp + 0x508]
push ecx
mov ecx, dword [ebp + esi*4]
push edx
call fcn.0047dd70
mov ecx, dword [esp + 0x20]
add ecx, eax
add esp, 0x10
inc esi
lea eax, [ebx - 1]
add edi, 0x20
cmp esi, eax
mov dword [esp + 0x10], ecx
jl 0x47e490
mov eax, ecx
test eax, eax
je 0x47e87e
mov eax, 0xffffff38
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [ebx - 1]
push edx
lea eax, [esp + 0x554]
push eax
call fcn.0047df70
mov eax, dword [esp + 0x24]
mov esi, eax
mov edi, eax
mov eax, dword [esp + 0x28]
add esp, 0x10
cmp ebx, 2
mov dword [esp + 0x138], esi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x13c], eax
mov dword [esp + 0x10], 2
jle 0x47e73d
lea ecx, [ebp + 0x210]
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
mov edi, dword [esp + eax*4 + 0x23c]
mov esi, dword [esp + eax*4 + 0x340]
mov dword [esp + 0x14], eax
cmp dword [esp + edi*4 + 0x444], esi
je 0x47e716
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + edi*4 + 0x344]
mov edx, dword [eax + esi*4 + 0x344]
mov ebx, dword [ebp + edi*4 + 0x208]
mov ebp, dword [ebp + esi*4 + 0x208]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + edi*4 + 0x138]
test ecx, ecx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + edi*4 + 0x34]
mov dword [esp + edi*4 + 0x444], esi
jl 0x47e5b2
test edx, edx
jge 0x47e5ae
mov edx, ecx
jmp 0x47e5b2
add edx, ecx
sar edx, 1
mov ecx, dword [esp + esi*4 + 0x138]
test ecx, ecx
jge 0x47e5c3
mov ecx, dword [esp + esi*4 + 0x34]
jmp 0x47e5cf
mov eax, dword [esp + esi*4 + 0x34]
test eax, eax
jl 0x47e5cf
add ecx, eax
sar ecx, 1
cmp edx, 0xffffffff
je 0x47e761
cmp ecx, 0xffffffff
je 0x47e761
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0xd58]
push eax
mov eax, dword [esp + 0xd60]
push eax
mov eax, dword [esp + 0x34]
push edx
mov edx, dword [esp + 0x3c]
push edx
call fcn.0047e160
add esp, 0x14
test eax, eax
je 0x47e6f7
mov edx, dword [esp + 0x14]
mov eax, 0xffffff38
mov dword [esp + 0x18], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x1c]
sub edx, ebx
push ecx
shl ebx, 5
push edx
lea eax, [esp + ebx + 0x554]
push eax
call fcn.0047df70
mov ebx, dword [esp + 0x24]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x3c]
push edx
mov eax, ebx
shl eax, 5
sub ebp, ebx
lea ecx, [esp + eax + 0x560]
push ebp
push ecx
call fcn.0047df70
mov eax, dword [esp + 0x38]
add esp, 0x20
test edi, edi
mov dword [esp + edi*4 + 0x34], eax
jne 0x47e67f
mov dword [esp + 0x138], eax
cmp esi, 1
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov dword [esp + ecx*4 + 0x138], edx
mov dword [esp + ecx*4 + 0x34], ebp
mov dword [esp + esi*4 + 0x138], eax
jne 0x47e6aa
mov dword [esp + 0x38], eax
test edx, edx
jge 0x47e6b2
test ebp, ebp
jl 0x47e70b
lea eax, [ebx - 1]
test eax, eax
jl 0x47e6d3
lea esp, [esp]
cmp dword [esp + eax*4 + 0x340], esi
jne 0x47e6d3
dec eax
mov dword [esp + eax*4 + 0x344], ecx
jns 0x47e6c0
mov edx, dword [esp + 0x24]
lea eax, [ebx + 1]
cmp eax, edx
jge 0x47e70b
mov edi, edi
cmp dword [esp + eax*4 + 0x23c], edi
jne 0x47e70b
mov dword [esp + eax*4 + 0x23c], ecx
inc eax
cmp eax, edx
jl 0x47e6e0
jmp 0x47e70b
mov eax, dword [esp + 0x10]
mov ecx, 0xffffff38
mov dword [esp + eax*4 + 0x138], ecx
mov dword [esp + eax*4 + 0x34], ecx
mov ebp, dword [esp + 0xd50]
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
inc eax
add edx, 4
cmp eax, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
jl 0x47e543
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x138]
mov eax, dword [esp + 0xd4c]
lea edx, [ebx*4]
push edx
push eax
call fcn.00470e50
add esp, 8
test esi, esi
mov dword [esp + 0x14], eax
jge 0x47e768
mov esi, edi
jmp 0x47e770
push 1
call fcn.00482845
test edi, edi
jl 0x47e770
add esi, edi
sar esi, 1
mov ecx, dword [esp + 0x13c]
test ecx, ecx
mov dword [eax], esi
jge 0x47e783
mov ecx, dword [esp + 0x38]
jmp 0x47e78f
mov edx, dword [esp + 0x38]
test edx, edx
jl 0x47e78f
add ecx, edx
sar ecx, 1
cmp ebx, 2
mov dword [eax + 4], ecx
mov dword [esp + 0x10], 2
jle 0x47e87e
mov ecx, dword [esp + 0x20]
add ecx, 0x34c
add ebp, 0x30c
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebp
jmp 0x47e7c1
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebp + 0xfc]
mov edi, dword [ebp]
mov ebp, dword [esp + 0x14]
mov esi, dword [ebp + eax*4]
mov ecx, dword [ebp + edi*4]
mov edx, dword [esp + 0x20]
mov ebx, dword [edx + eax*4 + 0x344]
and esi, 0x7fff
and ecx, 0x7fff
sub ecx, esi
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x18]
mov edx, dword [edx]
sub edx, ebx
imul eax, edx
mov edx, dword [esp + 0x20]
mov edi, dword [edx + edi*4 + 0x344]
sub edi, ebx
cdq
idiv edi
test ecx, ecx
jge 0x47e819
sub esi, eax
jmp 0x47e81b
add esi, eax
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + ecx*4 + 0x138]
test eax, eax
jge 0x47e830
mov eax, dword [esp + ecx*4 + 0x34]
jmp 0x47e83c
mov edx, dword [esp + ecx*4 + 0x34]
test edx, edx
jl 0x47e83c
add eax, edx
sar eax, 1
test eax, eax
jl 0x47e84a
cmp esi, eax
je 0x47e84a
mov dword [ebp + ecx*4], eax
jmp 0x47e854
or esi, 0x8000
mov dword [ebp + ecx*4], esi
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov eax, 4
add esi, eax
add edx, eax
mov eax, dword [esp + 0x24]
inc ecx
cmp ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], edx
jl 0x47e7bd
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd38
ret