Function at 0x49d770
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 0x49d7b9
mov ecx, esi
mov eax, 0xffffff38
lea edi, [esp + 0x148]
rep stosd dword es:[edi], eax
test esi, esi
jle 0x49d7ff
mov ecx, esi
mov eax, 0xffffff38
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
jle 0x49d7d9
mov ecx, esi
xor eax, eax
lea edi, [esp + 0x350]
rep stosd dword es:[edi], eax
test esi, esi
jle 0x49d7ff
mov ecx, esi
mov eax, 1
lea edi, [esp + 0x454]
rep stosd dword es:[edi], eax
jle 0x49d7fd
mov ecx, esi
or eax, 0xffffffff
lea edi, [esp + 0x24c]
rep stosd dword es:[edi], eax
test esi, esi
jne 0x49d82c
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.0049dc80
add esp, 0x1c
jmp 0x49d88b
lea eax, [esi - 1]
test eax, eax
jle 0x49dc1c
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.0049dc80
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 0x49d844
mov esi, dword [esp + 0x20]
mov eax, edx
test eax, eax
je 0x49dc1c
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.0049dea0
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 0x49db07
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 0x49dad7
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.0049e2e0
lea ecx, [esp + 0x50]
push esi
lea edx, [esp + 0x158]
push ecx
push edx
mov ebp, eax
call fcn.0049e2e0
add esp, 0x18
cmp ebp, 0xffffffff
je 0x49dbd9
cmp eax, 0xffffffff
je 0x49dbd9
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.0049e0b0
add esp, 0x1c
test eax, eax
je 0x49dabf
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.0049dea0
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.0049dea0
mov eax, dword [esp + 0x50]
add esp, 0x20
test edi, edi
mov dword [esp + edi*4 + 0x44], eax
jne 0x49da42
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 0x49da6d
mov dword [esp + 0x48], eax
test ecx, ecx
jge 0x49da75
test edx, edx
jl 0x49dad3
lea eax, [ebp - 1]
test eax, eax
jl 0x49da95
lea ecx, [esp + eax*4 + 0x454]
cmp dword [ecx], esi
jne 0x49da95
mov edx, dword [esp + 0x14]
dec eax
mov dword [ecx], edx
sub ecx, 4
test eax, eax
jge 0x49da83
mov ecx, dword [esp + 0x20]
lea eax, [ebp + 1]
cmp eax, ecx
jge 0x49dad3
lea ecx, [esp + eax*4 + 0x350]
cmp dword [ecx], edi
jne 0x49dad3
mov edx, dword [esp + 0x14]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x20]
add ecx, 4
cmp eax, edx
jl 0x49daa7
jmp 0x49dad3
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 0x49d906
mov esi, ecx
mov ecx, dword [esp + 0xd5c]
lea eax, [esi*4]
push eax
push ecx
call fcn.00490d70
mov ebx, eax
lea edx, [esp + 0x4c]
push 0
lea eax, [esp + 0x154]
push edx
push eax
mov dword [esp + 0x30], ebx
call fcn.0049e2e0
lea ecx, [esp + 0x58]
push 1
lea edx, [esp + 0x160]
push ecx
push edx
mov dword [ebx], eax
call fcn.0049e2e0
add esp, 0x20
cmp esi, 2
mov dword [ebx + 4], eax
mov dword [esp + 0x14], 2
jle 0x49dc1c
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.0049dc30
mov ebx, dword [esp + 0x28]
mov edi, eax
lea eax, [esp + 0x58]
push ebx
lea ecx, [esp + 0x160]
push eax
push ecx
call fcn.0049e2e0
add esp, 0x20
test eax, eax
jl 0x49dbe0
cmp edi, eax
je 0x49dbe0
mov edx, dword [esp + 0x10]
mov dword [edx], eax
jmp 0x49dbec
push 1
call fcn.004ba5f4
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 0x49db81
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0xd48
ret