Function at 0x4d9740
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x888
mov eax, dword [0x613ad0]
xor eax, ebp
mov dword [ebp - 0x24], eax
push esi
mov word [ebp - 0x848], 0
mov dword [ebp - 0x804], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa178]
and ecx, 0x400
mov dword [ebp - 0x814], ecx
cmp dword [ebp + 0x20], 0
je 0x4d978e
mov edx, dword [ebp + 8]
cmp dword [edx + 0xbe0], 0
jne 0x4d9798
mov eax, 1
jmp 0x4dadbf
cmp dword [ebp - 0x814], 0
jne 0x4d97e5
mov eax, fcn.00520c30
test eax, eax
je 0x4d97e5
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
mov eax, dword [ebp + 0x28]
mov ecx, dword [edx + eax*4]
cmp dword [ecx + 0x10], 0
je 0x4d97e5
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov ecx, dword [ebp + 0x28]
mov edx, dword [eax + ecx*4]
mov eax, dword [edx + 0x10]
mov ecx, dword [eax]
and ecx, 0x80
je 0x4d97e5
mov dword [ebp - 0x804], 1
mov edx, dword [ebp + 8]
mov dword [edx + 0x540], 0xffffffff
mov eax, dword [ebp + 8]
cmp dword [eax + 0x5a4], 0
jle 0x4d9841
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x708]
imul edx, edx, 0xb4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x704]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x708]
imul eax, eax, 0xb4
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x704]
mov ecx, dword [ecx + edx + 0x1c]
add ecx, dword [esi + eax + 0x28]
mov dword [ebp - 0x838], ecx
jmp 0x4d98fd
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6a8], 0
je 0x4d988d
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x708]
imul ecx, ecx, 0xb4
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x704]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x708]
imul edx, edx, 0xb4
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x704]
mov eax, dword [eax + ecx + 0x14]
add eax, dword [esi + edx + 0x24]
mov dword [ebp - 0x838], eax
jmp 0x4d98fd
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x708]
imul edx, edx, 0xb4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x704]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x708]
imul eax, eax, 0xb4
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x704]
mov ecx, dword [ecx + edx + 0x1c]
add ecx, dword [esi + eax + 0x34]
mov dword [ebp - 0x838], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4bc]
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x4b4]
cmp dword [ebp - 0x838], eax
jle 0x4d98fd
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4bc]
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x4b4]
mov dword [ebp - 0x838], eax
mov edx, dword [ebp + 8]
xor eax, eax
cmp dword [edx + 0x5a4], 0
setg al
mov dword [ebp - 0x844], eax
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x6a8], 0
je 0x4d99bb
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6f4], 0
je 0x4d99bb
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x6f4]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6f8]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0x28]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004fa5b0
add esp, 0x14
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x6fc], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6fc]
imul eax, eax, 0x30
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x6f4]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x6fc]
imul ecx, ecx, 0x30
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x6f4]
mov edx, dword [edx + eax]
add edx, dword [esi + ecx + 4]
mov dword [ebp - 0x810], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x6fc]
imul ecx, ecx, 0x30
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6f4]
mov ecx, dword [eax + ecx + 0x10]
mov dword [ebp - 0x830], ecx
jmp 0x4d99dc
mov edx, dword [ebp + 8]
mov dword [edx + 0x6fc], 0
mov dword [ebp - 0x830], 0
mov dword [ebp - 0x810], 0x270f
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x3420]
mov eax, dword [ebp + 8]
add ecx, dword [eax + 0x3424]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp - 0x14]
mov dword [ebp - 0x84c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
add eax, dword [edx + 0x3420]
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
mov eax, dword [ebp + 0x28]
mov ecx, dword [edx + eax*4]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x820], edx
cmp dword [ebp + 0x24], 0
jg 0x4d9a3b
jmp 0x4dabe5
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c4]
cmp ecx, dword [ebp - 0x838]
jle 0x4d9a5f
cmp dword [ebp - 0x844], 0
jne 0x4d9a5f
mov eax, 1
jmp 0x4dadbf
cmp dword [ebp - 0x814], 0
jne 0x4d9d53
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov ecx, dword [ebp + 0x28]
mov edx, dword [eax + ecx*4]
movzx eax, word [edx + 8]
cmp eax, 0xffff
jne 0x4d9d53
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0xa14c], 0
jne 0x4d9d53
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov ecx, dword [ebp + 0x28]
mov edx, dword [eax + ecx*4]
mov ax, word [edx + 0xa]
mov word [ebp - 0x81c], ax
movzx ecx, word [ebp - 0x81c]
imul ecx, ecx, 0x170
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3434]
mov ecx, dword [eax + ecx + 0x134]
mov dword [ebp - 0x818], ecx
mov dl, byte [ebp + 0x30]
push edx
mov ax, word [ebp - 0x81c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00505410
add esp, 0x10
movzx eax, word [ebp - 0x81c]
imul eax, eax, 0x170
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3434]
mov eax, dword [edx + eax + 0x130]
mov dword [ebp - 0x828], eax
movzx ecx, word [ebp - 0x81c]
imul ecx, ecx, 0x170
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3434]
movzx ecx, word [eax + ecx + 0x160]
xor edx, edx
test ecx, ecx
setg dl
mov dword [ebp - 0x83c], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c4]
cmp ecx, dword [ebp - 0x838]
jl 0x4d9b5f
cmp dword [ebp - 0x844], 0
je 0x4d9d40
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4c4]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x854], 0
jmp 0x4d9b8c
mov edx, dword [ebp - 0x854]
add edx, 1
mov dword [ebp - 0x854], edx
mov eax, dword [ebp - 0x854]
cmp eax, dword [ebp + 0x24]
jge 0x4d9bed
mov ecx, dword [ebp + 0x10]
add ecx, dword [ebp - 0x854]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xbe0]
movzx ecx, word [eax + ecx*2]
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x4c4]
mov eax, dword [ebp + 8]
mov dword [eax + 0x4c4], ecx
movzx ecx, word [ebp - 0x81c]
imul ecx, ecx, 0x170
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3434]
mov edx, dword [ebp - 0x854]
mov ax, word [eax + ecx + 0x160]
mov word [ebp + edx*2 - 0x800], ax
jmp 0x4d9b7d
cmp dword [ebp + 0x2c], 0
je 0x4d9c4c
mov ecx, dword [ebp - 0x818]
and ecx, 4
je 0x4d9c4c
movzx edx, word [ebp - 0x81c]
imul edx, edx, 0x170
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3434]
mov edx, dword [ecx + edx + 0x150]
and edx, 1
jne 0x4d9c4c
push 0
push 0x57
push 1
movzx eax, word [ebp - 0x81c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004ab070
add esp, 0x14
mov edx, dword [ebp + 8]
add eax, dword [edx + 0x4c4]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x4c4], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4c4]
cmp eax, dword [ebp - 0x838]
jg 0x4d9c6e
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x4c4]
mov dword [ebp - 0x868], edx
jmp 0x4d9c7a
mov eax, dword [ebp - 0x838]
mov dword [ebp - 0x868], eax
mov ecx, dword [ebp - 0x868]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x818]
and edx, 0x80
je 0x4d9cbe
mov eax, dword [ebp + 0x24]
push eax
movzx ecx, word [ebp - 0x81c]
push ecx
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004d92a0
add esp, 0x1c
jmp 0x4d9d40
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x6e8], 0
je 0x4d9cde
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6e8]
add eax, dword [ebp + 0x10]
mov dword [ebp - 0x86c], eax
jmp 0x4d9ce8
mov dword [ebp - 0x86c], 0
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp - 0x83c]
neg edx
sbb edx, edx
lea eax, [ebp - 0x800]
and edx, eax
push edx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xbe0]
mov eax, dword [ebp + 0x10]
lea ecx, [edx + eax*2]
push ecx
mov edx, dword [ebp + 0x24]
push edx
mov eax, dword [ebp - 0x86c]
push eax
mov ecx, dword [ebp + 0x20]
push ecx
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp + 0x14]
add eax, dword [ebp - 0x828]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004d59f0
add esp, 0x2c
mov cx, word [ebp - 0x81c]
mov word [ebp - 0x848], cx
jmp 0x4dabe5
mov dword [ebp - 0x858], 0
cmp dword [ebp + 0x10], 0
jle 0x4d9d7b
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xbdc]
mov ecx, dword [ebp + 0x10]
mov dx, word [eax + ecx*2 - 2]
mov word [ebp - 0x848], dx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov edx, dword [ebp + 0x28]
mov eax, dword [ecx + edx*4]
movzx ecx, word [eax + 8]
cmp ecx, 0xffff
jne 0x4d9dad
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xbdc]
mov ecx, dword [ebp + 0x10]
lea edx, [eax + ecx*2]
mov dword [ebp - 0x824], edx
jmp 0x4d9dc5
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov edx, dword [ebp + 0x28]
mov eax, dword [ecx + edx*4]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x824], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xbe0]
mov ecx, dword [ebp + 0x10]
lea edx, [eax + ecx*2]
mov dword [ebp - 0x834], edx
mov eax, dword [ebp - 0x824]
mov cx, word [eax]
mov word [ebp - 0x81c], cx
movzx edx, word [ebp - 0x81c]
imul edx, edx, 0x170
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3434]
mov edx, dword [ecx + edx + 0x134]
mov dword [ebp - 0x818], edx
movzx eax, word [ebp - 0x81c]
imul eax, eax, 0x170
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3434]
mov eax, dword [edx + eax + 0x150]
and eax, 1
mov dword [ebp - 4], eax
movzx ecx, word [ebp - 0x848]
imul ecx, ecx, 0x170
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3434]
mov ecx, dword [eax + ecx + 0x150]
and ecx, 1
mov dword [ebp - 8], ecx
mov dword [ebp - 0x82c], 0
movzx edx, word [ebp - 0x81c]
imul edx, edx, 0x170
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3434]
mov dx, word [ecx + edx + 0x160]
mov word [ebp - 0x800], dx
movzx eax, word [ebp - 0x800]
xor ecx, ecx
test eax, eax
setg cl
mov dword [ebp - 0x83c], ecx
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6e8], 0
je 0x4d9eb6
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x6e8]
add ecx, dword [ebp + 0x10]
mov dword [ebp - 0x870], ecx
jmp 0x4d9ec0
mov dword [ebp - 0x870], 0
mov edx, dword [ebp - 0x870]
mov dword [ebp - 0x850], edx
cmp dword [ebp + 0x28], 0
jl 0x4da094
push 0x400
mov eax, dword [ebp + 0x28]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004e08a0
add esp, 0xc
test eax, eax
je 0x4da094
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov ecx, dword [ebp + 0x28]
mov edx, dword [eax + ecx*4]
mov eax, dword [edx + 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
mov ecx, dword [ebp + 0x28]
mov edx, dword [edx + ecx*4]
mov ecx, dword [edx + 0x10]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x138]
mov esi, dword [ebp + 0x28]
mov edx, dword [edx + esi*4]
mov edx, dword [edx + 0x10]
mov ecx, dword [ecx + 0x74]
sub ecx, dword [edx + 0x78]
cmp dword [eax + 0x70], ecx
jle 0x4da094
mov dword [ebp - 0x85c], 0
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6a8], 0
je 0x4d9fc2
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov edx, dword [ebp + 0x28]
mov eax, dword [ecx + edx*4]
mov ecx, dword [eax + 0x3c]
and ecx, 0x100
je 0x4d9fc2
mov dword [ebp - 0x85c], 1
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov ecx, dword [ebp + 0x28]
mov edx, dword [eax + ecx*4]
mov eax, dword [edx + 0x14]
imul eax, eax, 0x58
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x2b38]
mov eax, dword [edx + eax + 0x18]
and eax, 0x802
je 0x4d9fa5
mov dword [ebp - 0x85c], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa170]
and edx, 0x40000000
je 0x4d9fc0
mov dword [ebp - 0x85c], 0
jmp 0x4d9ff3
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov edx, dword [ebp + 0x28]
mov eax, dword [ecx + edx*4]
mov ecx, dword [eax + 0x14]
imul ecx, ecx, 0x58
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x2b38]
mov ecx, dword [eax + ecx + 0x18]
and ecx, 2
je 0x4d9ff3
mov dword [ebp - 0x85c], 1
cmp dword [ebp - 0x85c], 0
je 0x4da032
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov ecx, dword [ebp + 0x28]
mov edx, dword [eax + ecx*4]
mov esi, dword [edx + 0x10]
push 1
push 0
mov eax, dword [ebp + 0x28]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004f9940
add esp, 0x10
mov edx, dword [esi + 0x70]
sub edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x4c4], edx
jmp 0x4da094
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
mov eax, dword [ebp + 0x28]
mov ecx, dword [edx + eax*4]
mov edx, dword [ecx + 0x14]
imul edx, edx, 0x58
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2b38]
mov edx, dword [ecx + edx + 0x18]
and edx, 1
je 0x4da094
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov edx, dword [ebp + 0x28]
mov eax, dword [ecx + edx*4]
mov esi, dword [eax + 0x10]
push 1
push 0
mov ecx, dword [ebp + 0x28]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004f9940
add esp, 0x10
mov ecx, dword [esi + 0x70]
sub ecx, eax
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
mov edx, dword [ebp + 8]
mov dword [edx + 0x4c4], eax
mov dword [ebp - 0x20], 1
cmp dword [ebp - 8], 0
je 0x4da144
cmp dword [ebp - 4], 0
jne 0x4da144
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp + 0x24]
jge 0x4da144
mov ecx, dword [ebp + 0x20]
add ecx, dword [ebp - 0x20]
movzx edx, byte [ecx]
cmp edx, 0x20
jne 0x4da144
push 0
push 0x20
push 1
movzx eax, word [ebp - 0x81c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004ab070
add esp, 0x14
mov edx, dword [ebp + 8]
add eax, dword [edx + 0x4c4]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x4c4], eax
mov edx, dword [ebp - 0x20]
add edx, 1
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x82c]
add eax, 1
mov dword [ebp - 0x82c], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x824]
mov ax, word [edx + ecx*2]
mov word [ebp - 0x81c], ax
movzx ecx, word [ebp - 0x81c]
imul ecx, ecx, 0x170
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3434]
mov ecx, dword [eax + ecx + 0x134]
mov dword [ebp - 0x818], ecx
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp + 0x24]
jg 0x4dabe5
cmp dword [ebp - 0x814], 0
jne 0x4da1a6
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov edx, dword [ebp + 0x28]
mov eax, dword [ecx + edx*4]
cmp dword [eax + 0x10], 0
je 0x4da1a6
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
mov eax, dword [ebp + 0x28]
mov ecx, dword [edx + eax*4]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx]
and eax, 0x400
je 0x4da1a6
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
mov eax, dword [ebp + 0x28]
mov ecx, dword [edx + eax*4]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x6c]
mov dword [ebp - 0x808], eax
jmp 0x4da1b0
mov dword [ebp - 0x808], 0xffffffff
cmp dword [ebp - 0x814], 0
jne 0x4da1f5
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
mov eax, dword [ebp + 0x28]
mov ecx, dword [edx + eax*4]
cmp dword [ecx + 0x10], 0
je 0x4da1f5
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov ecx, dword [ebp + 0x28]
mov edx, dword [eax + ecx*4]
mov eax, dword [edx + 0x10]
cmp dword [eax + 0x84], 0
jle 0x4da1f5
mov dword [ebp - 0x874], 1
jmp 0x4da1ff
mov dword [ebp - 0x874], 0
mov ecx, dword [ebp - 0x874]
mov dword [ebp - 0x840], ecx
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp + 0x24]
jge 0x4da242
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x824]
movzx edx, word [ecx + eax*2]
imul edx, edx, 0x170
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3434]
mov eax, dword [ebp - 0x20]
mov cx, word [ecx + edx + 0x160]
mov word [ebp + eax*2 - 0x800], cx
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp + 0x24]
jge 0x4da2e1
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x824]
movzx edx, word [ecx + eax*2]
movzx eax, word [ebp - 0x81c]
xor ecx, ecx
cmp edx, eax
setne cl
mov dword [ebp - 0x858], ecx
movzx edx, word [ebp - 0x81c]
imul edx, edx, 0x170
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3434]
movzx edx, word [ecx + edx + 0x160]
test edx, edx
je 0x4da2e1
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x824]
movzx edx, word [ecx + eax*2]
imul edx, edx, 0x170
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3434]
movzx edx, word [ecx + edx + 0x160]
test edx, edx
je 0x4da2e1
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x824]
movzx edx, word [ecx + eax*2]
push edx
movzx eax, word [ebp - 0x81c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004d7100
add esp, 0xc
mov dword [ebp - 0x858], eax
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp + 0x24]
je 0x4da428
cmp dword [ebp - 0x858], 0
jne 0x4da428
mov eax, dword [ebp + 0x20]
add eax, dword [ebp - 0x20]
movzx ecx, byte [eax]
cmp ecx, 9
je 0x4da428
mov edx, dword [ebp + 0x20]
add edx, dword [ebp - 0x20]
movzx eax, byte [edx]
cmp eax, 6
je 0x4da428
mov ecx, dword [ebp + 0x20]
add ecx, dword [ebp - 0x20]
movzx edx, byte [ecx]
cmp edx, 0x1c
je 0x4da428
mov eax, dword [ebp + 0x20]
add eax, dword [ebp - 0x20]
movzx ecx, byte [eax]
cmp ecx, 4
je 0x4da428
mov edx, dword [ebp + 0x20]
add edx, dword [ebp - 0x20]
movzx eax, byte [edx]
cmp eax, 0x20
jne 0x4da370
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x9998], 0
je 0x4da370
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xa16c]
and eax, 0x10000
je 0x4da428
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x1c], 0
jne 0x4da38b
mov edx, dword [ebp + 0x20]
add edx, dword [ebp - 0x20]
movzx eax, byte [edx]
cmp eax, 0x14
je 0x4da428
mov ecx, dword [ebp + 0x10]
add ecx, dword [ebp - 0x20]
cmp dword [ebp - 0x808], ecx
je 0x4da428
mov edx, dword [ebp - 0x20]
add edx, dword [ebp + 0x10]
cmp edx, dword [ebp - 0x810]
jge 0x4da428
mov eax, dword [ebp + 8]
cmp dword [eax + 0x6a8], 0
je 0x4da3dd
cmp dword [ebp - 0x830], 0
je 0x4da3dd
mov ecx, dword [ebp + 0x20]
add ecx, dword [ebp - 0x20]
movzx edx, byte [ecx - 1]
cmp edx, 0x20
je 0x4da428
mov eax, dword [ebp + 0x20]
add eax, dword [ebp - 0x20]
movzx ecx, byte [eax]
cmp ecx, 0x20
je 0x4da428
cmp dword [ebp - 0x840], 0
je 0x4dabd7
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 0x10]
lea ecx, [eax + edx - 1]
test ecx, ecx
jle 0x4dabd7
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov ecx, dword [ebp + 0x28]
mov edx, dword [eax + ecx*4]
mov eax, dword [edx + 0x10]
mov ecx, dword [ebp + 0x10]
add ecx, dword [ebp - 0x20]
mov edx, dword [eax + 0x88]
movzx eax, byte [edx + ecx - 1]
and eax, 2
je 0x4dabd7
mov cl, byte [ebp + 0x30]
push ecx
mov dx, word [ebp - 0x81c]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00505410
add esp, 0x10
mov edx, dword [ebp + 0x14]
add edx, dword [ebp + 0x1c]
movzx eax, word [ebp - 0x81c]
imul eax, eax, 0x170
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x3434]
sub edx, dword [ecx + eax + 0x12c]
movzx eax, word [ebp - 0x81c]
imul eax, eax, 0x170
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x3434]
add edx, dword [ecx + eax + 0x130]
mov dword [ebp - 0x80c], edx
mov edx, dword [ebp + 0x20]
add edx, dword [ebp - 0x82c]
movzx eax, byte [edx]
cmp eax, 9
jne 0x4da514
mov ecx, dword [ebp - 0x82c]
mov edx, dword [ebp - 0x824]
movzx eax, word [edx + ecx*2]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004ef310
add esp, 8
test eax, eax
jne 0x4da514
mov edx, dword [ebp - 0x82c]
mov eax, dword [ebp - 0x834]
movzx ecx, word [eax + edx*2]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x1c]
add eax, dword [edx + 0x3420]
push eax
mov ecx, dword [ebp - 0x84c]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x80c]
push eax
mov ecx, dword [ebp + 0x28]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00505ea0
add esp, 0x20
mov ecx, dword [ebp - 0x82c]
add ecx, 1
mov dword [ebp - 0x82c], ecx
jmp 0x4da61f
mov edx, dword [ebp + 8]
cmp dword [edx + 0x9998], 0
je 0x4da5c0
mov eax, dword [ebp + 0x20]
add eax, dword [ebp - 0x82c]
movzx ecx, byte [eax]
cmp ecx, 0x20
jne 0x4da5c0
mov edx, dword [ebp - 0x82c]
mov eax, dword [ebp - 0x824]
movzx ecx, word [eax + edx*2]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004ef310
add esp, 8
test eax, eax
jne 0x4da5c0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa16c]
and ecx, 0x10000
jne 0x4da5c0
mov edx, dword [ebp - 0x82c]
mov eax, dword [ebp - 0x834]
movzx ecx, word [eax + edx*2]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x1c]
add eax, dword [edx + 0x3420]
push eax
mov ecx, dword [ebp - 0x84c]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x80c]
push eax
mov ecx, dword [ebp + 0x28]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004fdc50
add esp, 0x20
mov ecx, dword [ebp - 0x82c]
add ecx, 1
mov dword [ebp - 0x82c], ecx
jmp 0x4da61f
mov edx, dword [ebp + 0x20]
add edx, dword [ebp - 0x82c]
movzx eax, byte [edx]
cmp eax, 6
je 0x4da5e2
mov ecx, dword [ebp + 0x20]
add ecx, dword [ebp - 0x82c]
movzx edx, byte [ecx]
cmp edx, 0x1c
jne 0x4da5ff
mov eax, dword [ebp + 8]
cmp dword [eax + 0x9998], 0
jne 0x4da5ff
mov ecx, dword [ebp - 0x82c]
add ecx, 1
mov dword [ebp - 0x82c], ecx
jmp 0x4da61f
mov edx, dword [ebp + 0x20]
add edx, dword [ebp - 0x82c]
movzx eax, byte [edx]
cmp eax, 4
jne 0x4da61f
mov ecx, dword [ebp - 0x82c]
add ecx, 1
mov dword [ebp - 0x82c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x28]
cmp eax, dword [edx + 0x5d8]
jne 0x4da64a
mov ecx, dword [ebp + 0x20]
add ecx, dword [ebp - 0x82c]
movzx edx, byte [ecx]
cmp edx, 0xc
jne 0x4da64a
mov dword [ebp - 0x878], 1
jmp 0x4da654
mov dword [ebp - 0x878], 0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x878]
mov dword [eax + 0x65c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4c4]
cmp eax, dword [ebp - 0x838]
jl 0x4da681
cmp dword [ebp - 0x844], 0
je 0x4daa51
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 0x82c]
jle 0x4daa51
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4c4]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x854], 0
jmp 0x4da6bd
mov edx, dword [ebp - 0x854]
add edx, 1
mov dword [ebp - 0x854], edx
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x82c]
cmp dword [ebp - 0x854], eax
jge 0x4da6f8
mov ecx, dword [ebp - 0x82c]
add ecx, dword [ebp - 0x854]
mov edx, dword [ebp - 0x834]
movzx eax, word [edx + ecx*2]
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x4c4]
mov edx, dword [ebp + 8]
mov dword [edx + 0x4c4], eax
jmp 0x4da6ae
cmp dword [ebp - 0x814], 0
jne 0x4da77f
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov edx, dword [ebp + 0x28]
mov eax, dword [ecx + edx*4]
cmp dword [eax + 0x10], 0
je 0x4da77f
mov ecx, dword [ebp + 0x10]
add ecx, dword [ebp - 0x82c]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov edx, dword [ebp + 0x28]
mov eax, dword [eax + edx*4]
mov edx, dword [eax + 0x10]
cmp ecx, dword [edx + 0x84]
jge 0x4da77f
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov edx, dword [ebp + 0x28]
mov eax, dword [ecx + edx*4]
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp + 0x10]
add edx, dword [ebp - 0x82c]
mov eax, dword [ecx + 0x88]
movzx ecx, byte [eax + edx]
and ecx, 1
je 0x4da77f
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x1c]
add eax, dword [edx + 0xa134]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xa140], 1
cmp dword [ebp - 0x814], 0
jne 0x4da7f6
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov ecx, dword [ebp + 0x28]
mov edx, dword [eax + ecx*4]
cmp dword [edx + 0x10], 0
je 0x4da7f6
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + eax - 1]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov eax, dword [ebp + 0x28]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ecx + 0x10]
cmp edx, dword [eax + 0x84]
jge 0x4da7f6
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
mov eax, dword [ebp + 0x28]
mov ecx, dword [edx + eax*4]
mov edx, dword [ecx + 0x10]
mov eax, dword [ebp + 0x10]
add eax, dword [ebp - 0x20]
mov ecx, dword [edx + 0x88]
movzx edx, byte [ecx + eax - 1]
and edx, 2
je 0x4da7f6
mov eax, dword [ebp + 8]
mov dword [eax + 0xa144], 1
cmp dword [ebp + 0x2c], 0
je 0x4da841
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp + 0x24]
jne 0x4da841
mov edx, dword [ebp - 0x818]
and edx, 4
je 0x4da841
cmp dword [ebp - 4], 0
jne 0x4da841
push 0
push 0x57
push 1
movzx eax, word [ebp - 0x81c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004ab070
add esp, 0x14
mov edx, dword [ebp + 8]
add eax, dword [edx + 0x4c4]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x4c4], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4c4]
cmp eax, dword [ebp - 0x838]
jle 0x4da869
cmp dword [ebp - 0x844], 0
jne 0x4da869
mov ecx, dword [ebp - 0x838]
mov dword [ebp - 0x87c], ecx
jmp 0x4da878
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4c4]
mov dword [ebp - 0x87c], eax
mov ecx, dword [ebp - 0x87c]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 0x14]
add edx, dword [ebp + 0x1c]
movzx eax, word [ebp - 0x81c]
imul eax, eax, 0x170
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x3434]
sub edx, dword [ecx + eax + 0x12c]
movzx eax, word [ebp - 0x81c]
imul eax, eax, 0x170
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x3434]
add edx, dword [ecx + eax + 0x130]
mov dword [ebp - 0x80c], edx
mov edx, dword [ebp - 0x818]
and edx, 0x80
je 0x4da914
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x82c]
push eax
movzx ecx, word [ebp - 0x81c]
push ecx
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x80c]
add ecx, dword [eax + 0x57c]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004d92a0
add esp, 0x1c
jmp 0x4da9b8
cmp dword [ebp - 0x83c], 0
je 0x4da932
mov edx, dword [ebp - 0x82c]
lea eax, [ebp + edx*2 - 0x800]
mov dword [ebp - 0x880], eax
jmp 0x4da93c
mov dword [ebp - 0x880], 0
cmp dword [ebp - 0x850], 0
je 0x4da959
mov ecx, dword [ebp - 0x850]
add ecx, dword [ebp - 0x82c]
mov dword [ebp - 0x884], ecx
jmp 0x4da963
mov dword [ebp - 0x884], 0
mov edx, dword [ebp + 0x1c]
push edx
mov eax, dword [ebp - 0x880]
push eax
mov ecx, dword [ebp - 0x82c]
mov edx, dword [ebp - 0x834]
lea eax, [edx + ecx*2]
push eax
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x82c]
push ecx
mov edx, dword [ebp - 0x884]
push edx
mov eax, dword [ebp + 0x20]
add eax, dword [ebp - 0x82c]
push eax
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x80c]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004d59f0
add esp, 0x2c
mov eax, dword [ebp + 8]
mov dword [eax + 0xa144], 0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xa140], 0
cmp dword [ebp - 4], 0
je 0x4daa51
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp + 0x24]
jge 0x4daa51
mov eax, dword [ebp + 0x20]
add eax, dword [ebp - 0x20]
movzx ecx, byte [eax]
cmp ecx, 0x20
jne 0x4daa51
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x824]
movzx ecx, word [eax + edx*2]
imul ecx, ecx, 0x170
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3434]
mov ecx, dword [eax + ecx + 0x150]
and ecx, 1
jne 0x4daa51
push 0
push 0x20
push 1
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x824]
movzx ecx, word [eax + edx*2]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004ab070
add esp, 0x14
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x4c4]
mov edx, dword [ebp + 8]
mov dword [edx + 0x4c4], eax
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 0x10]
add ecx, dword [ebp - 0x20]
cmp dword [ebp - 0x808], ecx
jne 0x4daa7e
mov edx, dword [ebp - 0x84c]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0x28]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00502560
add esp, 0x14
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp + 0x24]
jne 0x4daa8b
jmp 0x4dabe5
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x82c], edx
mov ax, word [ebp - 0x81c]
mov word [ebp - 0x848], ax
mov ecx, dword [ebp - 0x82c]
cmp ecx, dword [ebp + 0x24]
jge 0x4daac1
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x824]
mov cx, word [eax + edx*2]
mov word [ebp - 0x81c], cx
movzx edx, word [ebp - 0x81c]
imul edx, edx, 0x170
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3434]
mov edx, dword [ecx + edx + 0x134]
mov dword [ebp - 0x818], edx
movzx eax, word [ebp - 0x81c]
imul eax, eax, 0x170
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3434]
mov eax, dword [edx + eax + 0x150]
and eax, 1
mov dword [ebp - 4], eax
movzx ecx, word [ebp - 0x848]
imul ecx, ecx, 0x170
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3434]
mov ecx, dword [eax + ecx + 0x150]
and ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x20]
movzx eax, word [ebp + edx*2 - 0x800]
xor ecx, ecx
test eax, eax
setg cl
mov dword [ebp - 0x83c], ecx
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6a8], 0
je 0x4dabd7
mov eax, dword [ebp + 8]
cmp dword [eax + 0x6f4], 0
je 0x4dabd7
mov ecx, dword [ebp - 0x20]
add ecx, dword [ebp + 0x10]
cmp ecx, dword [ebp - 0x810]
jl 0x4dabd7
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6fc]
add eax, 1
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x6fc], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6fc]
imul eax, eax, 0x30
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x6f4]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x6fc]
imul ecx, ecx, 0x30
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x6f4]
mov edx, dword [edx + eax]
add edx, dword [esi + ecx + 4]
mov dword [ebp - 0x810], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x6fc]
imul ecx, ecx, 0x30
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6f4]
mov ecx, dword [eax + ecx + 0x10]
mov dword [ebp - 0x830], ecx
mov edx, dword [ebp - 0x20]
add edx, 1
mov dword [ebp - 0x20], edx
jmp 0x4da144
cmp dword [ebp + 0x2c], 0
je 0x4dadba
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c4]
cmp ecx, dword [ebp - 0x838]
jg 0x4dadba
mov edx, dword [ebp + 8]
cmp dword [edx + 0x5a4], 0
jne 0x4dadba
mov eax, dword [ebp + 8]
cmp dword [eax + 0x6a8], 0
je 0x4dac4c
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x6f4], 0
je 0x4dac4c
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x6fc]
cmp ecx, dword [eax + 0x6f8]
jge 0x4dac4c
mov dword [ebp - 0x888], 1
jmp 0x4dac56
mov dword [ebp - 0x888], 0
mov edx, dword [ebp - 0x888]
mov dword [ebp - 0x860], edx
mov eax, dword [ebp + 8]
cmp dword [eax + 0x540], 0
jl 0x4dac9c
push 0
push 0x57
push 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x540]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004ab070
add esp, 0x14
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x4c4]
mov edx, dword [ebp + 8]
mov dword [edx + 0x4c4], eax
mov al, byte [ebp + 0x30]
push eax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00505410
add esp, 0x10
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c4]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x838]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4bc]
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x4b4]
cmp dword [ebp - 0x10], ecx
jne 0x4dace7
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x860], 0
je 0x4dad2c
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x6fc]
imul edx, edx, 0x30
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x6f4]
mov edx, dword [ecx + edx + 0x10]
mov dword [ebp - 0x864], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x6fc]
imul ecx, ecx, 0x30
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6f4]
mov dword [eax + ecx + 0x10], 1
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x18]
jle 0x4dad83
mov edx, dword [ebp + 8]
push edx
call fcn.004fd550
add esp, 4
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x4b2c], eax
jne 0x4dad6f
mov edx, dword [ebp + 8]
cmp dword [edx + 0xaa8], 0
jne 0x4dad6f
mov eax, dword [ebp + 8]
cmp dword [eax + 0xa154], 0
jg 0x4dad6f
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x708], 0
jle 0x4dad83
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004fd9f0
add esp, 0xc
cmp dword [ebp - 0x860], 0
je 0x4dadab
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x6fc]
imul eax, eax, 0x30
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x6f4]
mov ecx, dword [ebp - 0x864]
mov dword [edx + eax + 0x10], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x838]
mov dword [edx + 0x4c4], eax
mov eax, 1
pop esi
mov ecx, dword [ebp - 0x24]
xor ecx, ebp
call fcn.005aac48
mov esp, ebp
pop ebp
ret