Function at 0x474df0
Capabilities:
Terminate process

Disassembly:
sub esp, 0xd48
mov edx, dword [esp + 0xd50]
mov eax, dword [edx + 0x508]
push ebx
push ebp
mov ebp, dword [edx + 0x510]
push esi
mov esi, dword [edx + 0x504]
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 0x474e39
mov ecx, esi
mov eax, 0xffffff38
lea edi, [esp + 0x148]
rep stosd dword es:[edi], eax
test esi, esi
jle 0x474e7f
mov ecx, esi
mov eax, 0xffffff38
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
jle 0x474e59
mov ecx, esi
xor eax, eax
lea edi, [esp + 0x350]
rep stosd dword es:[edi], eax
test esi, esi
jle 0x474e7f
mov ecx, esi
mov eax, 1
lea edi, [esp + 0x454]
rep stosd dword es:[edi], eax
jle 0x474e7d
mov ecx, esi
or eax, 0xffffffff
lea edi, [esp + 0x24c]
rep stosd dword es:[edi], eax
test esi, esi
jne 0x474eac
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0xd64]
push ebp
push eax
lea ecx, [esp + 0x560]
push ecx
push eax
mov eax, dword [esp + 0xd78]
push 0
push edx
push eax
call fcn.00475300
add esp, 0x1c
jmp 0x474f0b
lea eax, [esi - 1]
test eax, eax
jle 0x47529c
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.00475300
mov edx, dword [esp + 0x2c]
add edx, eax
mov eax, dword [esp + 0x30]
add esp, 0x1c
add edi, 0x20
add esi, 4
dec eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
jne 0x474ec4
mov esi, dword [esp + 0x20]
mov eax, edx
test eax, eax
je 0x47529c
mov eax, 0xffffff38
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esi - 1]
push edx
lea eax, [esp + 0x564]
push eax
call fcn.00475520
mov eax, dword [esp + 0x48]
mov dword [esp + 0x158], eax
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x44]
add esp, 0x10
cmp esi, 2
mov dword [esp + 0x48], eax
mov dword [esp + 0x14c], eax
mov dword [esp + 0x14], 2
jle 0x475187
mov ecx, dword [esp + 0xd60]
add ecx, 0x210
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], 0
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
mov edi, dword [esp + eax*4 + 0x350]
mov esi, dword [esp + eax*4 + 0x454]
mov dword [esp + 0x40], eax
cmp dword [esp + edi*4 + 0x24c], esi
je 0x475157
mov eax, dword [esp + 0xd60]
mov ebx, dword [eax + edi*4 + 0x208]
mov ecx, eax
mov edx, dword [ecx + esi*4 + 0x208]
mov eax, dword [ebp + edi*4 + 0x344]
mov ecx, dword [ebp + esi*4 + 0x344]
mov dword [esp + 0x3c], edx
push edi
lea edx, [esp + 0x48]
mov dword [esp + 0x28], eax
push edx
lea eax, [esp + 0x150]
push eax
mov dword [esp + edi*4 + 0x258], esi
mov dword [esp + 0x28], ecx
call fcn.00475960
push esi
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x15c]
push edx
mov ebp, eax
call fcn.00475960
add esp, 0x18
cmp ebp, 0xffffffff
je 0x475259
cmp eax, 0xffffffff
je 0x475259
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.00475730
add esp, 0x1c
test eax, eax
je 0x47513f
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
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x34]
mov eax, ebp
sub eax, ebx
push edx
shl ebx, 5
push eax
lea ecx, [esp + ebx + 0x564]
push ecx
call fcn.00475520
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x54]
mov ecx, ebp
sub eax, ebp
shl ecx, 5
push eax
lea edx, [esp + ecx + 0x574]
push edx
call fcn.00475520
mov eax, dword [esp + 0x50]
add esp, 0x20
test edi, edi
mov dword [esp + edi*4 + 0x44], eax
jne 0x4750c2
mov dword [esp + 0x148], eax
cmp esi, 1
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
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 0x4750ed
mov dword [esp + 0x48], eax
test ecx, ecx
jge 0x4750f5
test edx, edx
jl 0x475153
lea eax, [ebp - 1]
test eax, eax
jl 0x475115
lea ecx, [esp + eax*4 + 0x454]
cmp dword [ecx], esi
jne 0x475115
mov edx, dword [esp + 0x14]
mov dword [ecx], edx
dec eax
sub ecx, 4
test eax, eax
jge 0x475103
mov ecx, dword [esp + 0x20]
lea eax, [ebp + 1]
cmp eax, ecx
jge 0x475153
lea ecx, [esp + eax*4 + 0x350]
cmp dword [ecx], edi
jne 0x475153
mov edx, dword [esp + 0x14]
mov dword [ecx], edx
mov edx, dword [esp + 0x20]
inc eax
add ecx, 4
cmp eax, edx
jl 0x475127
jmp 0x475153
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 0x474f86
mov esi, ecx
mov ecx, dword [esp + 0xd5c]
lea eax, [esi*4]
push eax
push ecx
call fcn.0046a660
mov ebx, eax
push 0
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x158]
push eax
mov dword [esp + 0x30], ebx
call fcn.00475960
push 1
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x164]
push edx
mov dword [ebx], eax
call fcn.00475960
add esp, 0x20
cmp esi, 2
mov dword [ebx + 4], eax
mov dword [esp + 0x14], 2
jle 0x47529c
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.004752b0
mov ebx, dword [esp + 0x28]
mov edi, eax
push ebx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x164]
push ecx
call fcn.00475960
add esp, 0x20
test eax, eax
jl 0x475260
cmp edi, eax
je 0x475260
mov edx, dword [esp + 0x10]
mov dword [edx], eax
jmp 0x47526c
push 1
call fcn.004482b4
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
add edx, eax
add ecx, eax
inc ebx
add esi, 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 0x475201
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0xd48
ret