Function at 0x54b2e0
Capabilities:
Terminate process

Disassembly:
sub esp, 0xd48
mov edx, dword [esp + 0xd50]
push ebx
push ebp
push esi
mov esi, dword [edx + 0x504]
mov ebp, dword [edx + 0x510]
mov eax, dword [edx + 0x508]
xor ebx, ebx
cmp esi, ebx
push edi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], ebx
jle 0x54b329
mov ecx, esi
mov eax, 0xffffff38
lea edi, [esp + 0x148]
rep stosd dword es:[edi], eax
test esi, esi
jle 0x54b36f
mov ecx, esi
mov eax, 0xffffff38
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
jle 0x54b349
mov ecx, esi
xor eax, eax
lea edi, [esp + 0x350]
rep stosd dword es:[edi], eax
test esi, esi
jle 0x54b36f
mov ecx, esi
mov eax, 1
lea edi, [esp + 0x454]
rep stosd dword es:[edi], eax
jle 0x54b36d
mov ecx, esi
or eax, 0xffffffff
lea edi, [esp + 0x24c]
rep stosd dword es:[edi], eax
test esi, esi
jne 0x54b39c
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0xd64]
push ebp
lea ecx, [esp + 0x55c]
push eax
push ecx
push eax
mov eax, dword [esp + 0xd78]
push 0
push edx
push eax
call fcn.0054b7f0
add esp, 0x1c
jmp 0x54b3fb
lea eax, [esi - 1]
test eax, eax
jle 0x54b78c
mov esi, edx
lea edi, [esp + 0x558]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 4]
mov eax, dword [esi]
push ebp
push ecx
mov ecx, dword [esp + 0xd6c]
push edi
push edx
mov edx, dword [esp + 0xd78]
push eax
push ecx
push edx
call fcn.0054b7f0
mov edx, dword [esp + 0x2c]
add esp, 0x1c
add edx, eax
mov eax, dword [esp + 0x14]
add edi, 0x20
add esi, 4
dec eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
jne 0x54b3b4
mov esi, dword [esp + 0x20]
mov eax, edx
test eax, eax
je 0x54b78c
mov eax, 0xffffff38
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
lea edx, [esi - 1]
push eax
push ecx
lea eax, [esp + 0x560]
push edx
push eax
call fcn.0054ba10
mov eax, dword [esp + 0x48]
add esp, 0x10
mov dword [esp + 0x148], eax
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x34]
cmp esi, 2
mov dword [esp + 0x48], eax
mov dword [esp + 0x14c], eax
mov dword [esp + 0x14], 2
jle 0x54b677
mov ecx, dword [esp + 0xd60]
mov dword [esp + 0x10], 0
add ecx, 0x210
mov dword [esp + 0x18], ecx
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
mov dword [esp + 0x40], eax
mov edi, dword [esp + eax*4 + 0x350]
mov esi, dword [esp + eax*4 + 0x454]
cmp dword [esp + edi*4 + 0x24c], esi
je 0x54b647
mov eax, dword [esp + 0xd60]
push edi
mov ecx, eax
mov dword [esp + edi*4 + 0x250], esi
mov ebx, dword [eax + edi*4 + 0x208]
mov eax, dword [ebp + edi*4 + 0x344]
mov edx, dword [ecx + esi*4 + 0x208]
mov ecx, dword [ebp + esi*4 + 0x344]
mov dword [esp + 0x40], edx
mov dword [esp + 0x28], eax
lea edx, [esp + 0x48]
lea eax, [esp + 0x14c]
push edx
push eax
mov dword [esp + 0x28], ecx
call fcn.0054be50
lea ecx, [esp + 0x50]
push esi
lea edx, [esp + 0x158]
push ecx
push edx
mov ebp, eax
call fcn.0054be50
add esp, 0x18
cmp ebp, 0xffffffff
je 0x54b749
cmp eax, 0xffffffff
je 0x54b749
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0xd64]
push ecx
mov ecx, dword [esp + 0xd6c]
push edx
mov edx, dword [esp + 0x24]
push ecx
push eax
mov eax, dword [esp + 0x34]
push ebp
push edx
push eax
call fcn.0054bc20
add esp, 0x1c
test eax, eax
je 0x54b62f
mov ebp, dword [esp + 0x40]
mov eax, 0xffffff38
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], eax
mov eax, ebp
lea ecx, [esp + 0x2c]
sub eax, ebx
lea edx, [esp + 0x30]
shl ebx, 5
push ecx
push edx
lea ecx, [esp + ebx + 0x560]
push eax
push ecx
call fcn.0054ba10
lea edx, [esp + 0x2c]
lea eax, [esp + 0x34]
push edx
mov ecx, ebp
push eax
mov eax, dword [esp + 0x54]
shl ecx, 5
sub eax, ebp
lea edx, [esp + ecx + 0x570]
push eax
push edx
call fcn.0054ba10
mov eax, dword [esp + 0x50]
add esp, 0x20
test edi, edi
mov dword [esp + edi*4 + 0x44], eax
jne 0x54b5b2
mov dword [esp + 0x148], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
cmp esi, 1
mov dword [esp + eax + 0x150], ecx
mov dword [esp + eax + 0x4c], edx
mov eax, dword [esp + 0x1c]
mov dword [esp + esi*4 + 0x148], eax
jne 0x54b5dd
mov dword [esp + 0x48], eax
test ecx, ecx
jge 0x54b5e5
test edx, edx
jl 0x54b643
lea eax, [ebp - 1]
test eax, eax
jl 0x54b605
lea ecx, [esp + eax*4 + 0x454]
cmp dword [ecx], esi
jne 0x54b605
mov edx, dword [esp + 0x14]
dec eax
mov dword [ecx], edx
sub ecx, 4
test eax, eax
jge 0x54b5f3
mov ecx, dword [esp + 0x20]
lea eax, [ebp + 1]
cmp eax, ecx
jge 0x54b643
lea ecx, [esp + eax*4 + 0x350]
cmp dword [ecx], edi
jne 0x54b643
mov edx, dword [esp + 0x14]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x20]
add ecx, 4
cmp eax, edx
jl 0x54b617
jmp 0x54b643
mov eax, dword [esp + 0x10]
mov ecx, 0xffffff38
mov dword [esp + eax + 0x150], ecx
mov dword [esp + eax + 0x4c], ecx
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, 4
add esi, ecx
add edx, ecx
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], edx
jl 0x54b476
mov esi, ecx
mov ecx, dword [esp + 0xd5c]
lea eax, [esi*4]
push eax
push ecx
call fcn.005408e0
mov ebx, eax
lea edx, [esp + 0x4c]
push 0
lea eax, [esp + 0x154]
push edx
push eax
mov dword [esp + 0x30], ebx
call fcn.0054be50
lea ecx, [esp + 0x58]
push 1
lea edx, [esp + 0x160]
push ecx
push edx
mov dword [ebx], eax
call fcn.0054be50
add esp, 0x20
cmp esi, 2
mov dword [ebx + 4], eax
mov dword [esp + 0x14], 2
jle 0x54b78c
mov edx, dword [esp + 0xd60]
lea eax, [ebx + 8]
lea ecx, [ebp + 0x34c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
lea esi, [edx + 0x30c]
mov eax, dword [esi + 0xfc]
mov ecx, dword [esi]
mov edx, dword [ebp + eax*4 + 0x344]
mov edi, dword [ebp + ecx*4 + 0x344]
mov eax, dword [ebx + eax*4]
mov ecx, dword [ebx + ecx*4]
mov ebx, dword [esp + 0x18]
mov ebx, dword [ebx]
push ebx
push ecx
push eax
push edi
push edx
call fcn.0054b7a0
mov ebx, dword [esp + 0x28]
mov edi, eax
lea eax, [esp + 0x58]
push ebx
lea ecx, [esp + 0x160]
push eax
push ecx
call fcn.0054be50
add esp, 0x20
test eax, eax
jl 0x54b750
cmp edi, eax
je 0x54b750
mov edx, dword [esp + 0x10]
mov dword [edx], eax
jmp 0x54b75c
push 1
call fcn.0052c466
mov eax, dword [esp + 0x10]
or edi, 0x8000
mov dword [eax], edi
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov eax, 4
inc ebx
add esi, eax
add edx, eax
add ecx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], ebx
cmp ebx, eax
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], ecx
jl 0x54b6f1
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0xd48
ret