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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x63347b
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x652018]
xor eax, esp
mov dword [esp + 0xb8], eax
push ebx
push esi
push edi
mov eax, dword [0x652018]
xor eax, esp
push eax
lea eax, [esp + 0xd0]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x6c], ebx
mov esi, dword [ebp + 8]
mov dword [esp + 0x3c], esi
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x51d24f
jmp 0x51d23a
mov eax, dword [ecx]
test dword [eax], 0x100
jne 0x51dbda
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x51d23a
mov ecx, dword [ebx + 0x140]
test ecx, ecx
je 0x51d25f
mov eax, dword [ecx]
call dword [eax]
jmp 0x51d27f
mov ecx, dword [ebx + 0x13c]
test ecx, ecx
je 0x51d26f
mov eax, dword [ecx]
call dword [eax]
jmp 0x51d27f
mov eax, dword [ebx + 0x138]
test eax, eax
je 0x51d297
mov eax, dword [eax + 0x98]
cmp eax, 1
je 0x51d293
cmp eax, 2
je 0x51d293
cmp eax, 3
je 0x51d293
cmp eax, 4
jne 0x51d297
mov dl, 1
jmp 0x51d299
xor dl, dl
mov ecx, dword [esi + 0x28]
mov byte [esp + 0x17], dl
test ecx, ecx
je 0x51d2de
lea ebx, [ebx]
mov eax, dword [ecx]
test dword [eax], 0x4000
jne 0x51d2bd
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x51d2aa
jmp 0x51d2de
test dl, dl
je 0x51d2de
cmp byte [ebx + 0x88], 0
je 0x51d2de
lea eax, [esi + 4]
push eax
push 0x905b
push dword [ebx + 0x1c]
call 0x3cd1da
add esp, 0xc
movzx ecx, byte [ebx + 0x109]
lea eax, [esp + 0x50]
xor edi, edi
neg ecx
mov dword [esp + 0x50], edi
sbb ecx, ecx
and ecx, eax
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x48], eax
test eax, eax
je 0x51db56
mov edi, eax
mov esi, dword [edi]
mov dword [esp + 0x2c], esi
cmp dword [esi], 1
jne 0x51d33b
mov eax, dword [esi + 8]
cmp dword [eax + 4], 0
je 0x51d33b
cmp byte [ebx + 0x88], 0
je 0x51d33b
lea eax, [esi + 0xc]
push eax
push 0x77cf
push dword [ebx + 0x1c]
call 0x3cd1da
add esp, 0xc
cmp byte [ebx + 0x109], 0
mov dword [esp + 0x4c], 0
je 0x51d3a4
push 0x2c
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
mov esi, eax
mov eax, 0x4f
mov word [esi], ax
mov ecx, dword [edi + 8]
mov dword [esi + 4], ecx
mov ecx, dword [edi + 0xc]
mov dword [esi + 8], ecx
mov ecx, dword [edi + 0x10]
mov dword [esi + 0xc], ecx
mov ecx, 0x65e308
mov eax, dword [edi + 0x14]
mov dword [esi + 0x10], eax
mov dword [esi + 0x1c], 0x65e308
call 0x3db1ea
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x54]
mov dword [eax], esi
lea eax, [esi + 0x28]
mov dword [esp + 0x54], eax
lea eax, [esi + 0x24]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x40], eax
test eax, eax
je 0x51db3f
lea esp, [esp]
cmp dword [esi], 0
mov edx, dword [eax]
mov dword [esp + 0x20], edx
jne 0x51d3ec
mov eax, dword [edx + 0x1c]
test eax, eax
je 0x51d3d1
cmp dword [eax], 0x15
je 0x51d3ec
cmp byte [ebx + 0x109], 0
jne 0x51d3ec
cmp byte [esp + 0x17], 0
mov byte [esp + 0x16], 1
je 0x51db28
jmp 0x51d3f1
mov byte [esp + 0x16], 0
mov eax, dword [ebx + 0x14c]
test eax, eax
je 0x51d433
test byte [eax + 0x78], 1
je 0x51d433
cmp dword [eax + 0x50], 0
je 0x51d433
test byte [eax + 0x79], 0x80
jne 0x51d433
mov eax, dword [eax + 4]
mov ecx, dword [edx]
cmp eax, ecx
je 0x51db28
test eax, eax
je 0x51d433
test ecx, ecx
je 0x51d433
mov eax, dword [eax - 0xc]
cmp eax, dword [ecx - 0xc]
sete al
test al, al
jne 0x51db28
mov dword [esp + 0x90], 1
lea edi, [esp + 0xac]
mov eax, dword [edx + 0x20]
mov esi, edx
push 0
mov dword [esp + 0xa0], eax
mov ecx, 7
mov eax, dword [edx + 0x24]
push 0
mov dword [esp + 0xa8], eax
mov eax, dword [edx + 0x28]
push 0
mov dword [esp + 0xb0], eax
mov eax, dword [edx + 0x2c]
push 0
mov dword [esp + 0xb8], eax
lea eax, [esp + 0xa0]
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa8], 0
rep movsd dword es:[edi], dword [esi]
push 0x40
push eax
mov ecx, ebx
call fcn.0045436a
mov edi, eax
mov dword [esp + 0x1c], edi
test byte [edi + 2], 1
je 0x51d4db
mov eax, dword [ebx + 0x13c]
test eax, eax
je 0x51d4c2
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x51d4cc
mov eax, dword [ebx + 0x138]
test eax, eax
je 0x51d4d1
or word [eax + 2], 1
test byte [edi + 2], 1
jne 0x51db24
cmp byte [esp + 0x16], 0
mov esi, dword [esp + 0x2c]
je 0x51d56f
cmp byte [esp + 0x17], 0
je 0x51db28
mov eax, dword [esi + 4]
test eax, eax
je 0x51d501
add eax, 4
jmp 0x51d504
lea eax, [esi + 0xc]
mov edx, dword [ebx + 0x10]
mov ecx, dword [edi + 0x1c]
mov dword [esp + 0x18], eax
call fcn.00424f0a
test al, al
jne 0x51d552
mov ecx, dword [edi + 0x1c]
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x51db28
movzx eax, byte [ecx]
test byte [eax + eax*2 + 0x405212], 2
je 0x51db28
call 0x3dca3a
mov edx, dword [esp + 0x24]
mov ecx, eax
call fcn.00424f0a
test al, al
je 0x51db28
push dword [edi + 0x1c]
mov ecx, ebx
push dword [esp + 0x1c]
push 0x90bc
call fcn.0042202a
or word [edi + 2], 1
jmp 0x51db28
mov edx, dword [esp + 0x20]
xor edi, edi
mov eax, dword [edx + 0x20]
lea ecx, [edx + 0x20]
mov dword [esp + 0x80], eax
mov dword [esp + 0x34], edi
mov eax, dword [edx + 0x28]
mov dword [esp + 0x88], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x84], eax
mov eax, dword [esi + 0x18]
mov dword [esp + 0x8c], eax
mov eax, dword [edx + 0x1c]
test eax, eax
je 0x51d8ce
cmp dword [eax], 0x15
jne 0x51d8ce
mov eax, dword [esi]
cmp eax, 1
je 0x51d5c4
cmp eax, 2
jne 0x51d5e2
cmp byte [ebx + 0x88], 0
je 0x51d5e2
push ecx
push 0x77d0
push dword [ebx + 0x1c]
call 0x3cd1da
mov edx, dword [esp + 0x2c]
add esp, 0xc
lea eax, [esp + 0x34]
mov dword [esp + 0x34], edi
mov dword [esp + 0x18], eax
mov eax, dword [edx + 0x1c]
mov edx, dword [eax + 0x24]
mov dword [esp + 0x30], edx
test edx, edx
je 0x51d7cc
jmp 0x51d60a
mov eax, dword [ebx + 0x210]
push 0
mov ecx, dword [eax + 0x964]
mov eax, dword [edx]
push ecx
push 0
push 0x10
push dword [eax + 0x1c]
mov ecx, ebx
call fcn.00458e5a
mov esi, eax
test byte [esi + 2], 1
je 0x51d65b
mov eax, dword [ebx + 0x13c]
test eax, eax
je 0x51d642
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x51d64c
mov eax, dword [ebx + 0x138]
test eax, eax
je 0x51d651
or word [eax + 2], 1
test byte [esi + 2], 1
jne 0x51d755
cmp word [esi], 0x28
jne 0x51d6a5
add dword [esi + 0x28], 1
adc dword [esi + 0x2c], 0
cmp dword [esi + 0x2c], 0
jg 0x51d755
jl 0x51d67f
cmp dword [esi + 0x28], 0
jae 0x51d755
cmp byte [ebx + 0x88], 0
je 0x51d755
lea eax, [esi + 4]
push eax
push 0x7793
push dword [ebx + 0x1c]
call 0x3cd1da
add esp, 0xc
jmp 0x51d755
mov eax, dword [ebx + 0x210]
lea edi, [esi + 4]
mov ecx, ebx
push dword [eax + 0x964]
push edi
push 0
push 1
call fcn.004708fa
mov ecx, dword [ebx + 0x210]
mov dword [esp + 0x24], eax
mov eax, dword [ecx + 0x964]
mov dword [esp + 0x38], eax
test eax, eax
jne 0x51d6f2
push edi
push eax
push eax
push 0x65e308
push 0x2c
mov ecx, ebx
call fcn.004731ba
mov esi, eax
or word [esi + 2], 1
jmp 0x51d755
push 0x2c
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
mov edi, eax
mov eax, 0x37
mov word [edi], ax
mov cx, word [esi + 2]
and cx, 1
mov dword [edi + 0x24], esi
or word [edi + 2], cx
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x51d72c
mov ax, word [ecx + 2]
and ax, 1
mov dword [edi + 0x28], ecx
or word [edi + 2], ax
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x38]
mov dword [edi + 4], eax
mov eax, dword [esi + 8]
mov dword [edi + 8], eax
mov eax, dword [esi + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [edi + 0x10], eax
mov dword [edi + 0x1c], ecx
call 0x3db1ea
mov dword [edi + 0x14], eax
mov esi, edi
push 0x2c
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
mov edi, eax
mov eax, 0x4f
mov word [edi], ax
test esi, esi
je 0x51d77c
mov cx, word [esi + 2]
and cx, 1
mov dword [edi + 0x24], esi
or word [edi + 2], cx
mov eax, dword [esi + 4]
mov ecx, 0x65e308
mov dword [edi + 4], eax
mov eax, dword [esi + 8]
mov dword [edi + 8], eax
mov eax, dword [esi + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [edi + 0x10], eax
mov dword [edi + 0x1c], 0x65e308
call 0x3db1ea
mov edx, dword [esp + 0x30]
mov dword [edi + 0x14], eax
mov eax, dword [esp + 0x18]
mov dword [eax], edi
add edi, 0x28
mov edx, dword [edx + 4]
mov dword [esp + 0x18], edi
mov dword [esp + 0x30], edx
test edx, edx
jne 0x51d60a
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x51d800
mov eax, dword [esp + 0x20]
mov ecx, ebx
add eax, 0x20
push eax
push 0
push 0
push 0x65e308
push 0x2c
call fcn.004731ba
mov dword [esp + 0x18], eax
or word [eax + 2], 1
jmp 0x51d85a
push 0x2c
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
mov ecx, dword [esp + 0x34]
mov edi, eax
mov dword [esp + 0x18], edi
mov eax, 0x25
mov word [edi], ax
test ecx, ecx
je 0x51d82f
mov ax, word [ecx + 2]
and ax, 1
mov dword [edi + 0x24], ecx
or word [edi + 2], ax
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0x20]
mov dword [edi + 4], eax
mov eax, dword [ecx + 0x24]
mov dword [edi + 8], eax
mov eax, dword [ecx + 0x28]
mov dword [edi + 0xc], eax
mov eax, dword [ecx + 0x2c]
mov ecx, dword [esp + 0x24]
mov dword [edi + 0x10], eax
mov dword [edi + 0x1c], ecx
call 0x3db1ea
mov dword [edi + 0x14], eax
push 0x2c
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
mov ecx, dword [esp + 0x1c]
mov edi, eax
mov eax, 0x53
mov dword [esp + 0x34], edi
mov word [edi], ax
mov ax, word [ecx + 2]
and ax, 1
mov dword [edi + 0x24], ecx
or word [edi + 2], ax
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x51d89c
mov ax, word [ecx + 2]
and ax, 1
mov dword [edi + 0x28], ecx
or word [edi + 2], ax
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0x20]
mov dword [edi + 4], eax
mov eax, dword [ecx + 0x24]
mov dword [edi + 8], eax
mov eax, dword [ecx + 0x28]
mov dword [edi + 0xc], eax
mov eax, dword [ecx + 0x2c]
mov ecx, 0x65e308
mov dword [edi + 0x10], eax
mov dword [edi + 0x1c], 0x65e308
call 0x3db1ea
mov dword [edi + 0x14], eax
jmp 0x51d92c
mov eax, dword [esi]
cmp eax, 1
jne 0x51d8ec
mov eax, dword [esp + 0x1c]
mov ecx, ebx
push eax
push dword [esi + 0x28]
call fcn.0051288a
mov edi, eax
mov dword [esp + 0x34], edi
jmp 0x51d92c
cmp eax, 2
jne 0x51d92c
mov edi, dword [esi + 0x58]
test edi, edi
je 0x51d8fd
lea edx, [esi + 0x50]
jmp 0x51d8ff
xor edx, edx
mov eax, dword [esi + 4]
test eax, eax
je 0x51d90b
lea ecx, [eax + 4]
jmp 0x51d90d
xor ecx, ecx
lea eax, [esi + 0xc]
push eax
mov eax, dword [esp + 0x20]
push edx
push edi
push dword [esi + 0x48]
push ecx
push dword [esi + 0x28]
mov ecx, ebx
push eax
call fcn.0041a45a
mov edi, eax
mov dword [esp + 0x34], eax
cmp byte [esp + 0x17], 0
je 0x51d9b0
mov eax, dword [esi + 4]
test eax, eax
je 0x51d943
add eax, 4
jmp 0x51d946
lea eax, [esi + 0xc]
mov edx, dword [ebx + 0x10]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x1c]
call fcn.00424f0a
test al, al
jne 0x51d990
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x1c]
test ecx, ecx
je 0x51d9b0
movzx eax, byte [ecx]
test byte [eax + eax*2 + 0x405212], 2
je 0x51d9b0
call 0x3dca3a
mov edx, dword [esp + 0x24]
mov ecx, eax
call fcn.00424f0a
test al, al
je 0x51d9b0
mov eax, dword [esp + 0x1c]
mov ecx, ebx
push dword [eax + 0x1c]
push dword [esp + 0x1c]
push 0x90bc
call fcn.0042202a
mov eax, dword [esp + 0x1c]
or word [eax + 2], 1
cmp byte [ebx + 0x109], 0
je 0x51da79
cmp dword [esi], 2
jne 0x51da00
test edi, edi
je 0x51da04
test byte [edi + 2], 1
jne 0x51da00
mov eax, dword [edi + 0x28]
mov dword [esp + 0x18], eax
test eax, eax
je 0x51da00
mov ecx, dword [esi + 0x40]
add ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x10]
mov ebx, dword [esp + 0x18]
mov esi, dword [esi + 0x18]
mov dword [ebx + 4], ecx
mov ecx, ebx
mov ebx, dword [esp + 0x6c]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
mov dword [ecx + 0x10], esi
mov esi, dword [esp + 0x2c]
test edi, edi
jne 0x51da08
mov edi, dword [esp + 0x1c]
push 0x2c
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
mov edx, eax
mov eax, 0x4f
mov dword [esp + 0x24], edx
mov word [edx], ax
test edi, edi
je 0x51da33
mov cx, word [edi + 2]
and cx, 1
mov dword [edx + 0x24], edi
or word [edx + 2], cx
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx + 8]
mov dword [edx + 4], eax
mov eax, dword [ecx + 0xc]
mov dword [edx + 8], eax
mov eax, dword [ecx + 0x10]
mov dword [edx + 0xc], eax
mov eax, dword [ecx + 0x14]
mov ecx, 0x65e308
mov dword [edx + 0x10], eax
mov dword [edx + 0x1c], 0x65e308
call 0x3db1ea
mov ecx, dword [esp + 0x24]
mov dword [ecx + 0x14], eax
mov eax, dword [esp + 0x4c]
mov dword [eax], ecx
add ecx, 0x28
mov dword [esp + 0x4c], ecx
jmp 0x51db28
test edi, edi
je 0x51db28
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + 0x28]
test ecx, ecx
je 0x51daa1
mov eax, dword [ecx]
test dword [eax], 0x4000
jne 0x51dc00
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x51da8c
mov eax, dword [esp + 0x20]
lea ecx, [ebx + 0x24]
push 0x30
movzx esi, word [eax + 0x30]
call fcn.0053ac4a
mov edx, eax
mov eax, 0x1e
mov word [edx], ax
mov ecx, dword [esp + 0x80]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x84]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x88]
mov dword [edx + 0xc], ecx
lea ecx, [edx + 0x18]
mov eax, dword [esp + 0x8c]
mov dword [edx + 0x10], eax
mov word [edx + 0x20], si
mov eax, dword [ebx + 0x1d8]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edx + 0x14], eax
mov dword [ecx], 0
mov eax, dword [ebx + 0x10c]
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edx
mov dword [ebx + 0x128], ecx
mov dword [ebx + 0x12c], edx
mov dword [edx + 0x28], edi
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 4]
mov dword [esp + 0x40], eax
test eax, eax
jne 0x51d3ba
mov edi, dword [esp + 0x48]
mov edi, dword [edi + 4]
mov dword [esp + 0x48], edi
test edi, edi
jne 0x51d30a
mov edi, dword [esp + 0x50]
mov esi, dword [esp + 0x3c]
cmp byte [ebx + 0x109], 0
je 0x51dbda
movzx esi, word [esi + 0x20]
lea ecx, [ebx + 0x24]
push 0x30
call fcn.0053ac4a
mov edx, eax
mov eax, 0x21
mov word [edx], ax
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
lea ecx, [edx + 0x18]
mov eax, dword [eax + 0xc]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + 0x10]
mov dword [edx + 0x10], eax
mov word [edx + 0x20], si
mov eax, dword [ebx + 0x1d8]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edx + 0x14], eax
mov dword [ecx], 0
mov eax, dword [ebx + 0x10c]
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edx
mov dword [ebx + 0x128], ecx
mov dword [ebx + 0x12c], edx
mov dword [edx + 0x28], edi
mov ecx, dword [esp + 0xd0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb8]
xor ecx, esp
call 0x59f19b
mov esp, ebp
pop ebp
ret 4
cmp byte [ebx + 0x1d4], 0
jne 0x51daa1
lea eax, [ebx + 0x108]
mov byte [esp + 0x2b], 0
mov dword [esp + 0x1c], 0
test eax, eax
je 0x51dc28
mov cl, byte [eax]
jmp 0x51dc2a
xor cl, cl
mov dword [esp + 0x58], 0x41eec8
mov byte [esp + 0x16], cl
mov byte [esp + 0x5c], cl
mov dword [esp + 0x60], eax
mov byte [esp + 0x64], 0
mov dword [esp + 0x58], 0x424afc
mov dword [esp + 0xd8], 0
mov ecx, ebx
mov edi, dword [esp + 0x20]
push 0
push 0
mov byte [eax], 0
lea eax, [esp + 0x24]
push 0xffffffffffffffff
push eax
lea eax, [esp + 0x3b]
push eax
lea eax, [edi + 0x20]
push eax
call 0x400b8a
push eax
push 0
push 0x40001
push 0
push dword [ebx + 0x8c]
mov ecx, ebx
push dword [edi]
call 0x3fcc9a
mov ecx, eax
call 0x400dda
lea ecx, [ebx + 0x108]
mov edi, eax
test ecx, ecx
je 0x51dcaa
mov dl, byte [esp + 0x16]
mov byte [ecx], dl
cmp byte [esp + 0x2b], 0
mov byte [esp + 0x64], 1
jne 0x51e6b9
test edi, edi
je 0x51e6b9
mov ecx, edi
call 0x3f681a
mov ecx, eax
call fcn.00481b9a
test al, al
jne 0x51e6b9
mov edi, dword [edi + 0x74]
mov dword [esp + 0x38], edi
test edi, edi
je 0x51e699
mov ecx, edi
call 0x3dd2ea
test al, al
jne 0x51e699
mov ecx, edi
call 0x3f681a
mov ecx, eax
call fcn.00481b9a
test al, al
jne 0x51e699
mov eax, dword [ebx + 0x210]
mov ecx, dword [ebx + 0x10]
push 0
push 0
push dword [ebx + 0x178]
mov eax, dword [eax + 0x94c]
push 0x13a
mov dword [esp + 0x40], eax
call 0x3c62ea
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], 0
test eax, eax
je 0x51dd61
mov eax, dword [esp + 0x20]
movzx ecx, word [eax + 0x30]
lea eax, [esp + 0x80]
push ecx
push eax
mov ecx, ebx
call fcn.0051b8aa
mov dword [esp + 0x18], eax
jmp 0x51dd8a
mov eax, dword [ebx + 0xc]
mov ecx, ebx
mov eax, dword [eax + 0xc]
push dword [eax + 0x398]
mov eax, dword [esp + 0x24]
push dword [esp + 0x20]
push edi
movzx eax, word [eax + 0x30]
push eax
lea eax, [esp + 0x90]
push eax
call fcn.0051be7a
push 0x74
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
cmp dword [esp + 0x24], 0
mov edx, eax
mov eax, 7
mov dword [esp + 0x68], edx
mov word [edx], ax
mov ecx, dword [esp + 0x80]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x84]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x88]
mov dword [edx + 0xc], ecx
mov eax, dword [esp + 0x8c]
mov dword [edx + 0x10], eax
mov eax, 0xfffe
mov word [edx + 0x20], ax
mov eax, dword [ebx + 0x1d8]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edx + 0x14], eax
mov dword [edx + 0x18], 0
mov eax, dword [ebx + 0x10c]
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edx
lea eax, [edx + 0x28]
mov dword [ebx + 0x128], eax
mov eax, dword [esp + 0x80]
mov dword [ebx + 0x10c], edx
mov dword [ebx + 0x12c], 0
mov dword [edx + 0x2c], eax
mov eax, dword [esp + 0x84]
mov dword [edx + 0x30], eax
mov eax, dword [esp + 0x88]
mov dword [edx + 0x34], eax
mov eax, dword [esp + 0x8c]
mov dword [edx + 0x38], eax
je 0x51de5d
push dword [esp + 0x18]
lea eax, [esp + 0x84]
mov ecx, ebx
push dword [esp + 0x20]
push edi
push eax
call fcn.0051b96a
push 0x70
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
mov edx, eax
mov edi, 0xfffe
mov eax, 1
push 0x74
mov word [edx], ax
mov ecx, dword [esp + 0x84]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x88]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x8c]
mov dword [edx + 0xc], ecx
lea ecx, [ebx + 0x24]
mov eax, dword [esp + 0x90]
mov dword [edx + 0x10], eax
mov word [edx + 0x20], di
mov eax, dword [ebx + 0x1d8]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edx + 0x14], eax
mov dword [edx + 0x18], 0
mov eax, dword [ebx + 0x10c]
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edx
lea eax, [edx + 0x28]
mov dword [ebx + 0x128], eax
mov eax, dword [esp + 0x84]
mov dword [ebx + 0x10c], edx
mov dword [ebx + 0x12c], 0
mov dword [edx + 0x2c], eax
mov eax, dword [esp + 0x88]
mov dword [edx + 0x30], eax
mov eax, dword [esp + 0x8c]
mov dword [edx + 0x34], eax
mov eax, dword [esp + 0x90]
mov dword [edx + 0x38], eax
call fcn.0053ac4a
mov edx, eax
mov eax, 2
mov dword [esp + 0x44], edx
mov word [edx], ax
mov ecx, dword [esp + 0x80]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x84]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x88]
mov dword [edx + 0xc], ecx
mov eax, dword [esp + 0x8c]
mov dword [edx + 0x10], eax
mov word [edx + 0x20], di
mov eax, dword [ebx + 0x1d8]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edx + 0x14], eax
mov dword [edx + 0x18], 0
mov eax, dword [ebx + 0x10c]
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edx
lea eax, [edx + 0x28]
mov dword [ebx + 0x128], eax
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0x10c], edx
mov dword [ebx + 0x12c], 0
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0xdc]
mov eax, dword [ebx + 0x210]
mov edi, dword [eax + 0x928]
lea eax, [esp + 0x80]
push eax
push ecx
push dword [esp + 0x38]
mov ecx, ebx
push eax
push 0
push 0
call fcn.004708fa
add esp, 4
push eax
push ecx
mov ecx, dword [esp + 0x2c]
push 0
push 0x10
lea eax, [ecx + 0x20]
push eax
push ecx
push esi
push 0
push 0x10
push dword [esp + 0x44]
mov ecx, ebx
push 0
push 0
push dword [esp + 0x6c]
push eax
call fcn.00462a8a
push eax
mov ecx, ebx
call fcn.00458f7a
push eax
push edi
push 0x44
mov ecx, ebx
call fcn.004731ba
mov ecx, dword [esp + 0x44]
push 0x30
mov dword [ecx + 0x6c], eax
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
mov edi, eax
mov eax, 0x1e
mov word [edi], ax
mov ecx, dword [esp + 0x80]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x84]
mov dword [edi + 8], ecx
mov ecx, dword [esp + 0x88]
mov dword [edi + 0xc], ecx
lea ecx, [edi + 0x18]
mov eax, dword [esp + 0x8c]
mov dword [edi + 0x10], eax
mov eax, 0xfffe
mov word [edi + 0x20], ax
mov eax, dword [ebx + 0x1d8]
mov dword [edi + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edi + 0x14], eax
mov dword [ecx], 0
mov eax, dword [ebx + 0x10c]
mov dword [edi + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edi
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0x128], ecx
mov dword [ebx + 0x12c], edi
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0xdc]
lea eax, [esp + 0x80]
push eax
push ecx
push dword [esp + 0x38]
mov ecx, ebx
push eax
push 0
push 2
call fcn.004708fa
add esp, 4
push eax
push ecx
mov ecx, dword [esp + 0x2c]
push 0
push 0x10
lea eax, [ecx + 0x20]
push eax
push ecx
push esi
push 0
push 0x10
push dword [esp + 0x44]
push 0
push 0
push dword [esp + 0x6c]
mov ecx, ebx
push eax
call fcn.00462a8a
push eax
mov ecx, ebx
call fcn.00458f7a
push eax
push 0x65e308
push 0x53
mov ecx, ebx
call fcn.004731ba
push 0x30
lea ecx, [ebx + 0x24]
mov dword [edi + 0x28], eax
call fcn.0053ac4a
mov edx, eax
mov edi, 0xfffe
mov eax, 0x1e
mov word [edx], ax
mov ecx, dword [esp + 0x80]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x84]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x88]
mov dword [edx + 0xc], ecx
lea ecx, [edx + 0x18]
mov eax, dword [esp + 0x8c]
mov dword [edx + 0x10], eax
mov word [edx + 0x20], di
mov eax, dword [ebx + 0x1d8]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edx + 0x14], eax
mov dword [ecx], 0
mov eax, dword [ebx + 0x10c]
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edx
mov eax, dword [esp + 0x34]
mov dword [ebx + 0x128], ecx
mov ecx, ebx
mov dword [ebx + 0x12c], edx
mov dword [edx + 0x28], eax
call fcn.005218da
push 0x74
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
mov edx, eax
mov eax, 3
mov dword [esp + 0x44], edx
mov word [edx], ax
mov ecx, dword [esp + 0x80]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x84]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x88]
mov dword [edx + 0xc], ecx
mov eax, dword [esp + 0x8c]
mov dword [edx + 0x10], eax
mov word [edx + 0x20], di
mov eax, dword [ebx + 0x1d8]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edx + 0x14], eax
mov dword [edx + 0x18], 0
mov eax, dword [ebx + 0x10c]
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edx
lea eax, [edx + 0x28]
mov dword [ebx + 0x128], eax
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0x10c], edx
mov dword [ebx + 0x12c], 0
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0xdc]
mov eax, dword [ebx + 0x210]
mov edi, dword [eax + 0x928]
lea eax, [esp + 0x80]
push eax
push ecx
push dword [esp + 0x38]
mov ecx, ebx
push eax
push 0
push 2
call fcn.004708fa
add esp, 4
push eax
push ecx
mov ecx, dword [esp + 0x2c]
push 0
push 0x10
lea eax, [ecx + 0x20]
push eax
push ecx
push esi
push 0
push 0x10
push dword [esp + 0x44]
lea esi, [ecx + 0x20]
mov ecx, ebx
push 0
push 0
push dword [esp + 0x6c]
push esi
call fcn.00462a8a
push eax
mov ecx, ebx
call fcn.00458f7a
push eax
push edi
push 0x44
mov ecx, ebx
call fcn.004731ba
mov ecx, dword [esp + 0x44]
push esi
push ecx
mov dword [ecx + 0x6c], eax
mov ecx, ebx
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 0xc]
push dword [eax + 0xe0]
call fcn.0041eaba
test eax, eax
je 0x51e3b8
push 0
push 0
push 0
push esi
push esi
push eax
mov ecx, ebx
call fcn.0045a3ca
mov edi, eax
test byte [edi + 2], 1
jne 0x51e3b8
mov edx, dword [ebx + 0x210]
mov ecx, dword [edx]
push dword [ecx + 0x10]
lea ecx, [edx + 4]
push ecx
lea ecx, [esp + 0x80]
call fcn.00402cea
cmp dword [esp + 0x78], 1
jne 0x51e3ab
mov ecx, dword [esp + 0x7c]
call 0x3da5aa
cmp eax, 6
jne 0x51e3ab
mov ecx, dword [ebx + 0x210]
mov eax, dword [ecx]
push dword [eax + 0x10]
lea eax, [ecx + 4]
push eax
lea ecx, [esp + 0x78]
call fcn.00402cea
mov eax, dword [esp + 0x70]
mov ecx, ebx
dec eax
neg eax
sbb eax, eax
not eax
and eax, dword [esp + 0x74]
push eax
push dword [edi + 0x1c]
call fcn.0041deca
test al, al
je 0x51e3ab
lea esi, [ebx + 0x24]
push 0x30
mov ecx, esi
call fcn.0053ac4a
mov edx, eax
mov eax, 0x20
mov word [edx], ax
mov ecx, dword [esp + 0x80]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x84]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x88]
mov dword [edx + 0xc], ecx
lea ecx, [edx + 0x18]
mov eax, dword [esp + 0x8c]
mov dword [edx + 0x10], eax
mov eax, 0xfffe
mov word [edx + 0x20], ax
mov eax, dword [ebx + 0x1d8]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edx + 0x14], eax
mov dword [ecx], 0
mov eax, dword [ebx + 0x10c]
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edx
mov dword [ebx + 0x128], ecx
mov dword [ebx + 0x12c], edx
mov dword [edx + 0x28], edi
jmp 0x51e3bb
push esi
push 0x77c9
mov ecx, ebx
call fcn.00421dba
lea esi, [ebx + 0x24]
mov ecx, ebx
call fcn.005218da
call fcn.005218da
call fcn.005218da
push ecx
lea eax, [esp + 0x84]
push eax
push dword [esp + 0x70]
call fcn.0052184a
mov dword [ebx + 0x10c], eax
mov ecx, esi
add eax, 0x28
mov dword [ebx + 0x12c], 0
push 0x30
mov dword [ebx + 0x128], eax
call fcn.0053ac4a
mov edi, eax
mov eax, 0x1e
mov word [edi], ax
mov ecx, dword [esp + 0x80]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x84]
mov dword [edi + 8], ecx
mov ecx, dword [esp + 0x88]
mov dword [edi + 0xc], ecx
lea ecx, [edi + 0x18]
mov eax, dword [esp + 0x8c]
mov dword [edi + 0x10], eax
mov eax, 0xfffe
mov word [edi + 0x20], ax
mov eax, dword [ebx + 0x1d8]
mov dword [edi + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edi + 0x14], eax
mov dword [ecx], 0
mov eax, dword [ebx + 0x10c]
mov dword [edi + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edi
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0x128], ecx
mov dword [ebx + 0x12c], edi
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0xdc]
lea eax, [esp + 0x80]
push eax
push ecx
push dword [esp + 0x38]
mov ecx, ebx
push eax
push 0
push 1
call fcn.004708fa
add esp, 4
push eax
push ecx
mov ecx, dword [esp + 0x2c]
push 0
push 0x10
lea eax, [ecx + 0x20]
push eax
push ecx
push esi
push 0
push 0x10
push dword [esp + 0x44]
mov ecx, ebx
push 0
push 0
push dword [esp + 0x6c]
push eax
call fcn.00462a8a
push eax
mov ecx, ebx
call fcn.00458f7a
push eax
push 0x65e308
push 0x53
mov ecx, ebx
call fcn.004731ba
mov dword [edi + 0x28], eax
mov edi, dword [esp + 0x24]
test edi, edi
je 0x51e641
push 0x70
lea ecx, [ebx + 0x24]
call fcn.0053ac4a
mov edx, eax
mov eax, 1
push 0x74
mov word [edx], ax
mov ecx, dword [esp + 0x84]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x88]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x8c]
mov dword [edx + 0xc], ecx
lea ecx, [ebx + 0x24]
mov eax, dword [esp + 0x90]
mov dword [edx + 0x10], eax
mov eax, 0xfffe
mov word [edx + 0x20], ax
mov eax, dword [ebx + 0x1d8]
mov dword [edx + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [edx + 0x14], eax
mov dword [edx + 0x18], 0
mov eax, dword [ebx + 0x10c]
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x128]
mov dword [eax], edx
lea eax, [edx + 0x28]
mov dword [ebx + 0x128], eax
mov eax, dword [esp + 0x84]
mov dword [ebx + 0x10c], edx
mov dword [ebx + 0x12c], 0
mov dword [edx + 0x2c], eax
mov eax, dword [esp + 0x88]
mov dword [edx + 0x30], eax
mov eax, dword [esp + 0x8c]
mov dword [edx + 0x34], eax
mov eax, dword [esp + 0x90]
mov dword [edx + 0x38], eax
call fcn.0053ac4a
mov esi, eax
mov eax, 2
push 0
push 0x10
push 0
mov word [esi], ax
mov ecx, dword [esp + 0x8c]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x90]
mov dword [esi + 8], ecx
mov ecx, dword [esp + 0x94]
mov dword [esi + 0xc], ecx
mov ecx, ebx
mov eax, dword [esp + 0x98]
mov dword [esi + 0x10], eax
mov eax, 0xfffe
mov word [esi + 0x20], ax
mov eax, dword [ebx + 0x1d8]
mov dword [esi + 0x24], eax
mov eax, dword [ebx + 0x12c]
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], 0
mov eax, dword [ebx + 0x10c]
mov dword [esi + 0x1c], eax
mov eax, dword [ebx + 0x128]
push 0
push 0
push dword [esp + 0x2c]
mov dword [eax], esi
lea eax, [esi + 0x28]
mov dword [ebx + 0x128], eax
lea eax, [esp + 0x98]
push eax
mov dword [ebx + 0x10c], esi
mov dword [ebx + 0x12c], 0
call fcn.00462a8a
mov dword [esi + 0x6c], eax
mov eax, dword [ebx + 0xc]
mov ecx, ebx
mov eax, dword [eax + 0xc]
push dword [eax + 0x39c]
lea eax, [esp + 0x84]
push dword [esp + 0x20]
push dword [esp + 0x40]
push 0xfffe
push eax
call fcn.0051be7a
test edi, edi
je 0x51e679
mov ecx, ebx
call fcn.005218da
call fcn.005218da
mov ecx, ebx
call fcn.005218da
mov dword [esp + 0xd8], 0xffffffff
lea ecx, [esp + 0x58]
call fcn.0041930a
jmp 0x51db24
mov ecx, ebx
call fcn.0042854a
mov dword [esp + 0xd8], 0xffffffff
lea ecx, [esp + 0x58]
call fcn.0041930a
jmp 0x51db28
mov eax, dword [ebx + 0x13c]
test eax, eax
je 0x51e6ca
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x51e6d4
mov eax, dword [ebx + 0x138]
test eax, eax
je 0x51e6d9
or word [eax + 2], 1
mov dword [esp + 0xd8], 0xffffffff
mov dword [esp + 0x58], 0x424afc
jmp 0x51db28