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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1ec
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, dword [edi + 0x82c]
mov eax, ebx
sar eax, 1
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x830]
push 0x104
mov dword [esp + 0xac], eax
mov eax, dword [edi + 0x938]
lea edx, [esp + 0xb8]
lea ecx, [edi + 0x300]
push 0
push edx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x78], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0xbc], 0
call fcn.004f9940
mov eax, dword [edi + 0x8b8]
mov esi, dword [edi + 0x8f0]
mov dword [esp + 0x50], eax
mov eax, dword [edi + 0x91c]
xor edx, edx
div esi
add esp, 0xc
mov dword [edi + 0x918], 1
mov ecx, eax
mov eax, dword [edi + 0x920]
mov dword [edi + 0x928], edx
xor edx, edx
div esi
mov esi, edi
sub ecx, eax
mov dword [edi + 0x924], ecx
call fcn.00496ed0
cmp dword [edi + 0x830], 0
mov ecx, dword [edi + 0x868]
mov dword [edi + 0x894], ecx
mov dword [esp + 0x18], 0
jle 0x4983d2
mov eax, ebx
shl eax, 4
mov dword [esp + 0xc], 0
mov dword [esp + 0x68], eax
xor esi, esi
cmp dword [edi + 0x82c], esi
jle 0x4983b7
mov edx, dword [edi + 0x894]
mov eax, dword [esp + 0xc]
add edx, eax
add edx, esi
cmp dword [edi + 0xb38], 0
push ebx
je 0x49836c
mov ecx, dword [edi + 0x8a0]
push edx
mov edx, dword [edi + 0x89c]
add ecx, eax
add ecx, esi
push ecx
mov ecx, dword [edi + 0x898]
add edx, eax
add edx, esi
add ecx, eax
push edx
add ecx, esi
push ecx
call dword [0x64d9b0]
add esp, 0x14
jmp 0x4983a4
mov ecx, dword [edi + 0x898]
push ebx
add ecx, eax
push edx
add ecx, esi
push ecx
call dword [0x64d998]
mov eax, dword [esp + 0x1c]
mov edx, dword [edi + 0x894]
mov ecx, dword [edi + 0x89c]
push ebx
add edx, eax
push ebx
add edx, esi
add ecx, eax
push edx
add ecx, esi
push ecx
call dword [0x64d9a4]
add esp, 0x20
add esi, 0x10
cmp esi, dword [edi + 0x82c]
jl 0x498327
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x18]
add dword [esp + 0xc], eax
add ecx, 0x10
cmp ecx, dword [edi + 0x830]
mov dword [esp + 0x18], ecx
jl 0x498319
cmp dword [edi + 0x830], 0
mov eax, dword [edi + 0x82c]
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], eax
mov dword [esp + 0x18], 0
jle 0x499489
cmp dword [edi + 0x82c], 0
mov dword [esp + 0x14], 0
jle 0x499472
mov eax, dword [esp + 0x18]
mov ecx, eax
imul ecx, ebx
mov dword [esp + 0x38], ecx
mov ecx, eax
sar ecx, 1
mov dword [esp + 0x68], ecx
imul ecx, dword [esp + 0x10]
lea edx, [ebx*8 + 8]
sar eax, 4
mov dword [esp + 0x88], edx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x58], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
add eax, dword [esp + 0x38]
mov edx, dword [esp + 0x14]
add eax, edx
lea esi, [eax + 8]
mov dword [esp + 0x94], esi
lea esi, [eax + ebx*8]
mov dword [esp + 0x98], esi
mov esi, dword [esp + 0x88]
add esi, eax
mov dword [esp + 0x9c], esi
mov esi, dword [esp + 0x5c]
mov eax, edx
sar eax, 1
mov dword [esp + 0x30], eax
add eax, esi
mov esi, dword [ecx + 4]
add esi, eax
mov dword [esp + 0xa0], esi
mov esi, dword [ecx + 8]
add esi, eax
mov eax, dword [edi + 0x834]
imul eax, dword [esp + 0x58]
sar edx, 4
add eax, edx
imul eax, eax, 0x124
add eax, dword [esp + 0x44]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x6c]
mov dword [esp + 0xa4], esi
mov esi, dword [esp + 0x60]
mov dword [esp + 0x1c], edx
sub edx, esi
mov dword [eax + 0x5c], edx
je 0x498513
cmp edx, 0xfffffffe
jge 0x4984e2
mov dword [eax + 0x5c], 0xfffffffe
jmp 0x4984ee
cmp edx, 2
jle 0x4984ee
mov dword [eax + 0x5c], 2
mov edx, dword [eax + 0x5c]
add edx, esi
cmp edx, 1
mov dword [esp + 0x1c], edx
jge 0x498506
mov dword [esp + 0x1c], 1
jmp 0x498513
cmp edx, 0x1f
jle 0x498513
mov dword [esp + 0x1c], 0x1f
mov edx, dword [esp + 0x1c]
mov esi, edx
sub esi, dword [esp + 0x60]
mov dword [eax + 0x58], edx
mov dword [eax + 0x5c], esi
mov ecx, dword [ecx]
mov esi, dword [esp + 0x38]
mov eax, dword [edi + 0x868]
add ecx, esi
add eax, esi
mov esi, dword [edi + 0x834]
imul esi, dword [esp + 0x58]
add esi, dword [esp + 0x64]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x14]
imul esi, esi, 0x124
add esi, dword [esp + 0x44]
add ecx, edx
add eax, edx
mov edx, dword [esp + 0x8c]
push edx
push edx
push eax
push ecx
mov dword [esp + 0xa0], ecx
mov dword [esp + 0x80], eax
mov dword [esp + 0x44], esi
call dword [0x64d950]
add esp, 0x10
cmp eax, 0x100
mov dword [esp + 0xc], eax
jae 0x4985b5
push 0x124
push 0
push esi
call fcn.004f9940
mov eax, dword [esp + 0x18]
mov dword [esi + 0x64], eax
mov dword [esi + 0x54], eax
mov eax, dword [esp + 0x28]
add esp, 0xc
mov dword [esi], 0xffffffff
mov dword [esi + 0x58], eax
jmp 0x498c4d
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x64]
push ecx
mov dword [esi + 0x64], eax
mov dword [esi + 0x54], eax
push edx
mov dword [esi], 0
mov eax, dword [edi + 0x838]
mov ecx, dword [edi + 0x834]
mov edx, dword [edi + 0x8bc]
push eax
push ecx
push edx
lea eax, [esp + 0x128]
push eax
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x180]
call fcn.00495d30
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx*4 + 0x5fefe0]
mov ecx, dword [esp + 0x50]
mov dword [esp + 0xf8], edx
mov edx, dword [edi + 0x894]
add edx, ecx
mov dword [esp + 0x1b8], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0x2c]
add edx, eax
mov dword [esp + 0xcc], edx
mov edx, dword [edi + 0x898]
add edx, ecx
add edx, eax
mov dword [esp + 0xd0], edx
mov edx, dword [edi + 0x89c]
add edx, ecx
add edx, eax
mov dword [esp + 0xd4], edx
mov edx, dword [edi + 0x8a0]
add edx, ecx
mov ecx, dword [esp + 0x12c]
add edx, eax
mov dword [esp + 0xd8], edx
lea edx, [ecx + ecx]
mov ecx, dword [esp + 0x130]
mov eax, 0x5ff508
sub eax, edx
movsx eax, word [eax]
lea edx, [ecx + ecx]
mov ecx, 0x5ff508
sub ecx, edx
movsx edx, word [ecx]
mov ecx, dword [esi + 0x64]
add eax, edx
imul eax, ecx
imul eax, dword [esp + 0xf8]
shr eax, 0xa
add eax, ecx
mov dword [esp + 0x15c], eax
mov dword [esp + 0x158], eax
xor eax, eax
lea edx, [esp + 0x15c]
mov dword [esp + 0x170], edx
mov edx, dword [edi + 0x868]
add edx, dword [esp + 0x50]
mov dword [esp + 0x104], eax
mov dword [esp + 0x100], eax
mov dword [esp + 0x174], eax
lea eax, [esp + 0x100]
lea ecx, [esp + 0x12c]
mov dword [esp + 0x128], eax
mov eax, dword [esp + 0xb8]
add esp, 0x18
add edx, dword [esp + 0x14]
mov dword [esp + 0x13c], ecx
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0x1a4], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x1a8], ecx
mov dword [esp + 0x1ac], edx
mov ecx, dword [esp + 0x5c]
lea edx, [eax + ecx]
add edx, dword [edi + 0x86c]
add eax, ecx
add eax, dword [edi + 0x870]
mov dword [esp + 0x1b0], edx
mov dword [esp + 0x1b4], eax
mov eax, dword [esp + 0x1c]
shl eax, 7
cmp dword [esp + 0xc], eax
ja 0x4987b3
mov ecx, dword [edi + 0xb28]
mov edx, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x4c]
push edx
lea eax, [esp + 0xb8]
push eax
call fcn.004a1530
add esp, 0xc
test eax, eax
je 0x4987b3
push 0x124
push 0
push esi
call fcn.004f9940
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
add esp, 0xc
mov dword [esi + 0x64], eax
mov dword [esi + 0x54], eax
mov dword [esi], 0xffffffff
mov dword [esi + 0x58], ecx
jmp 0x498c4d
mov ecx, dword [edi + 0x93c]
mov esi, dword [edi + 0x82c]
sub esi, dword [esp + 0x14]
mov edx, dword [edi + 0x830]
add ecx, 4
mov eax, 1
shl eax, cl
lea esi, [esi + esi - 0x20]
mov dword [esp + 0xc4], esi
lea ecx, [eax - 1]
neg eax
cmp ecx, esi
jg 0x4987ee
mov dword [esp + 0xc4], ecx
mov esi, dword [esp + 0x18]
sub edx, esi
lea edx, [edx + edx - 0x20]
cmp ecx, edx
mov dword [esp + 0xcc], edx
jg 0x49880a
mov dword [esp + 0xcc], ecx
mov ecx, dword [esp + 0x14]
neg ecx
mov dword [esp + 0x20], ecx
add ecx, ecx
cmp eax, ecx
mov dword [esp + 0xc8], eax
jg 0x498828
mov dword [esp + 0xc8], ecx
mov ecx, esi
neg ecx
mov dword [esp + 0x24], ecx
add ecx, ecx
cmp eax, ecx
mov dword [esp + 0xd0], eax
jg 0x498844
mov dword [esp + 0xd0], ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0xb0]
mov eax, esi
mov esi, dword [edi + 0x834]
mov edi, dword [esp + 0x44]
push edx
call fcn.004a0ea0
add esp, 4
lea eax, [esp + 0xb0]
call fcn.004a11c0
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0xb38]
push eax
lea eax, [esp + 0xb4]
call fcn.004a0ba0
mov esi, dword [esp + 0x38]
add esp, 4
cmp dword [esi + 0x5c], 0
jne 0x498936
mov ecx, dword [esp + 0x158]
cmp dword [ecx], 0x800
jl 0x498936
mov eax, dword [esp + 0x14]
test eax, eax
je 0x49893a
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x49893a
mov edx, dword [edi + 0x82c]
sub edx, 0x10
cmp eax, edx
jge 0x49893a
mov edx, dword [edi + 0x830]
sub edx, 0x10
cmp ecx, edx
jge 0x49893a
mov edx, dword [esp + 0x1c]
lea edx, [edx*4 + 0x5ff060]
mov dword [esp + 0xac], edx
lea edx, [esp + 0x148]
mov dword [esp + 0x2c], edx
lea edx, [esp + 0x1bc]
mov dword [esp + 0x28], edx
lea edx, [esi + 8]
mov dword [esp + 0x3c], edx
lea edx, [esp + 0xe8]
sub edx, esi
mov dword [esp + 0x54], edx
lea edx, [esp + 0x114]
sub edx, esi
mov dword [esp + 0x160], 1
mov dword [esp + 0xc], 0
mov dword [esp + 0x4c], edx
jmp 0x4989b4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x38]
mov edx, dword [edi + 0x894]
add edx, ecx
add edx, eax
mov dword [esp + 0x1b8], edx
mov dword [esp + 0xb4], edx
mov edx, dword [edi + 0x898]
add edx, ecx
add edx, eax
mov dword [esp + 0x1bc], edx
mov dword [esp + 0xb8], edx
mov edx, dword [edi + 0x89c]
add edx, ecx
add edx, eax
mov dword [esp + 0x1c0], edx
mov dword [esp + 0xbc], edx
mov edx, dword [edi + 0x8a0]
add edx, ecx
add edx, eax
mov dword [esp + 0x160], 0
mov dword [esp + 0x1c4], edx
mov dword [esp + 0xc0], edx
jmp 0x498bbf
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
mov edi, dword [edi + 0x834]
mov ebx, dword [esp + 0x44]
push edx
push ecx
push eax
lea esi, [esp + 0xbc]
call fcn.004a0d80
mov ecx, dword [esp + 0x18]
xor edx, edx
mov eax, ecx
mov esi, 2
div esi
mov esi, dword [esp + 0x20]
mov edi, dword [ebp + 8]
add esp, 0xc
lea esi, [esi + edx*8]
mov edx, dword [esp + 0x18]
lea eax, [edx + eax*8]
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x3c]
lea ebx, [edx + eax]
mov edx, dword [edi + 0x834]
mov eax, dword [esp + 0x44]
push edx
push eax
mov eax, dword [esp + 0x6c]
mov edx, ecx
mov ecx, dword [esp + 0x60]
call fcn.00495aa0
mov dword [ebx], eax
mov eax, dword [esp + 0x58]
imul eax, dword [esp + 0x48]
mov dword [ebx + 4], edx
mov edx, dword [ebp + 0xc]
lea ecx, [eax + esi]
add ecx, dword [edx]
mov edx, dword [esp + 0x30]
mov dword [esp + 0xb8], ecx
mov ecx, dword [edi + 0x894]
add ecx, eax
add ecx, esi
mov dword [edx - 4], ecx
mov dword [esp + 0xbc], ecx
mov ecx, dword [edi + 0x898]
add ecx, eax
add ecx, esi
mov dword [edx], ecx
mov dword [esp + 0xc0], ecx
mov ecx, dword [edi + 0x89c]
add ecx, eax
add ecx, esi
mov dword [edx + 4], ecx
mov dword [esp + 0xc4], ecx
mov ecx, dword [edi + 0x8a0]
add ecx, eax
lea eax, [ecx + esi]
mov dword [edx + 8], eax
mov edx, dword [esp + 0xb4]
mov ecx, dword [edx]
mov edx, dword [esp + 0x5c]
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0x34]
mov dword [eax], connect
mov dword [esp + 0xec], ecx
mov ecx, dword [esp + 0x44]
add edx, ecx
mov ecx, dword [edi + 0x93c]
mov dword [esp + 0x160], eax
add ecx, 4
mov eax, 1
shl eax, cl
mov dword [esp + 0x118], edx
mov edx, dword [edi + 0x82c]
add esp, 8
lea ecx, [eax - 1]
mov dword [esp + 0x13c], ebx
mov ebx, dword [edi + 0x830]
neg eax
sub edx, esi
lea edx, [edx + edx - 0x10]
cmp ecx, edx
mov dword [esp + 0xc4], edx
jg 0x498b04
mov dword [esp + 0xc4], ecx
mov edx, dword [esp + 0x50]
sub ebx, edx
lea ebx, [ebx + ebx - 0x10]
cmp ecx, ebx
mov dword [esp + 0xcc], ebx
jg 0x498b20
mov dword [esp + 0xcc], ecx
neg esi
add esi, esi
cmp eax, esi
mov dword [esp + 0xc8], eax
jg 0x498b36
mov dword [esp + 0xc8], esi
neg edx
add edx, edx
cmp eax, edx
mov dword [esp + 0xd0], eax
jg 0x498b4c
mov dword [esp + 0xd0], edx
lea eax, [esp + 0xb0]
call fcn.004a0f40
mov edx, dword [edi + 0xb38]
push edx
lea eax, [esp + 0xb4]
call fcn.004a0c90
mov eax, dword [esp + 0x114]
mov ecx, dword [eax]
mov eax, dword [esp + 0x40]
add dword [esp + 0x2c], 0x10
add dword [esp + 0x30], 4
mov dword [eax - 4], ecx
mov edx, dword [esp + 0x114]
mov ecx, dword [edx + 4]
mov dword [eax], ecx
mov ecx, dword [esp + 0x10]
add eax, 8
add ecx, 1
add esp, 4
cmp ecx, 4
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ecx
jl 0x4989b0
mov esi, dword [esp + 0x34]
mov ebx, dword [esp + 0x40]
mov ecx, dword [esp + 0x38]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
add edx, ecx
add edx, eax
mov dword [esp + 0xb0], edx
mov edx, dword [esp + 0xa0]
mov dword [esp + 0x1a4], edx
mov edx, dword [esp + 0xa4]
mov dword [esp + 0x1a8], edx
mov edx, dword [edi + 0x868]
add edx, ecx
mov ecx, dword [esp + 0x5c]
add edx, eax
mov dword [esp + 0x1ac], edx
mov edx, dword [esp + 0x30]
add edx, ecx
add edx, dword [edi + 0x86c]
mov dword [esp + 0x1b0], edx
mov edx, dword [esp + 0x30]
add edx, ecx
mov ecx, dword [esp + 0x18]
add edx, dword [edi + 0x870]
push ecx
push eax
lea edi, [esp + 0xb8]
mov dword [esp + 0x1bc], edx
call fcn.004a1870
mov esi, dword [esi]
add esp, 8
cmp esi, 0xffffffff
jne 0x498ce9
mov esi, dword [esp + 0x34]
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x868]
add eax, dword [esp + 0x38]
add eax, dword [esp + 0x14]
lea edx, [eax + 8]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x88]
add edx, eax
lea ecx, [eax + ebx*8]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x7c], edx
mov edx, dword [esp + 0x5c]
add eax, edx
mov edx, dword [esp + 0x10]
add eax, dword [edi + 0x86c]
push edx
push 8
mov dword [esp + 0x80], ecx
lea ecx, [edi + 0x780]
push eax
push ecx
call dword [0x64d974]
mov edx, dword [esp + 0x6c]
lea eax, [edi + 0x780]
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x40]
add eax, edx
mov edx, dword [esp + 0x20]
add eax, dword [edi + 0x870]
push edx
push 8
lea ecx, [edi + 0x7c0]
push eax
push ecx
call dword [0x64d974]
lea eax, [edi + 0x7c0]
add esp, 0x20
mov dword [esp + 0x84], eax
jmp 0x499117
test esi, esi
je 0x498ffe
cmp esi, 1
je 0x498ffe
cmp esi, 2
jne 0x499110
mov eax, dword [esp + 0x34]
mov esi, dword [eax + 0xc]
mov edi, dword [eax + 4]
mov edx, dword [eax + 0x14]
mov ecx, dword [eax + 0x1c]
mov dword [esp + 0x3c], esi
add esi, edi
add esi, edx
add esi, ecx
mov dword [esp + 0x2c], edi
mov edi, dword [eax + 0x10]
mov dword [esp + 0x28], edi
mov dword [esp + 0x54], ecx
mov ecx, dword [eax + 0x20]
mov dword [esp + 0x4c], edx
mov edx, dword [eax + 0x18]
mov eax, dword [eax + 8]
add edi, eax
mov dword [esp + 0x50], eax
mov eax, esi
sar esi, 3
and eax, 0xf
movzx eax, word [eax*2 + 0x5faa40]
add edi, edx
add eax, esi
add edi, ecx
mov esi, edi
and esi, 0xf
movzx esi, word [esi*2 + 0x5faa40]
sar edi, 3
add esi, edi
mov edi, dword [esp + 0x8c]
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0x14]
add esi, eax
add edi, 0xfffffff0
cmp esi, edi
jle 0x498d8d
mov eax, dword [esp + 0x8c]
sub eax, dword [esp + 0x14]
sub eax, 0x10
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0xc]
add esi, edi
mov edi, dword [esp + 0xa8]
add edi, 0xfffffff0
cmp esi, edi
jle 0x498db9
mov esi, dword [esp + 0xa8]
sub esi, dword [esp + 0x18]
sub esi, 0x10
mov dword [esp + 0xc], esi
jmp 0x498dbd
mov esi, dword [esp + 0xc]
mov edi, dword [esp + 0x14]
add edi, eax
jns 0x498dc9
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
add esi, edi
jns 0x498dd9
mov esi, dword [esp + 0x24]
mov dword [esp + 0xc], esi
mov edi, dword [esp + 0x50]
mov esi, dword [esp + 0x2c]
and esi, 1
and edi, 1
add edi, edi
or edi, esi
mov esi, dword [esp + 0x50]
mov edi, dword [esp + edi*4 + 0x1b8]
sar esi, 1
imul esi, ebx
add edi, esi
mov esi, dword [esp + 0x2c]
sar esi, 1
add edi, esi
mov esi, dword [esp + 0x3c]
and esi, 1
mov dword [esp + 0x70], edi
mov edi, dword [esp + 0x28]
and edi, 1
add edi, edi
or edi, esi
mov esi, dword [esp + 0x28]
mov edi, dword [esp + edi*4 + 0x1c8]
sar esi, 1
imul esi, ebx
add edi, esi
mov esi, dword [esp + 0x3c]
sar esi, 1
add edi, esi
mov esi, edx
sar edx, 1
imul edx, ebx
and esi, 1
add esi, esi
mov dword [esp + 0x74], edi
mov edi, dword [esp + 0x4c]
and edi, 1
or esi, edi
mov esi, dword [esp + esi*4 + 0x1d8]
add esi, edx
mov edx, dword [esp + 0x4c]
sar edx, 1
add esi, edx
mov edx, ecx
sar ecx, 1
imul ecx, ebx
mov dword [esp + 0x78], esi
mov esi, dword [esp + 0x54]
and edx, 1
mov edi, esi
add edx, edx
and edi, 1
or edx, edi
mov edx, dword [esp + edx*4 + 0x1e8]
add edx, ecx
sar esi, 1
add edx, esi
mov edi, dword [ebp + 8]
mov dword [esp + 0x7c], edx
mov edx, dword [esp + 0xc]
mov esi, edx
sar esi, 1
add esi, dword [esp + 0x68]
mov ecx, eax
imul esi, dword [esp + 0x10]
sar ecx, 1
mov dword [esp + 0x2c], ecx
add ecx, esi
add ecx, dword [esp + 0x30]
and eax, 1
add ecx, dword [edi + 0x86c]
and edx, 1
lea eax, [edx + eax*2]
mov dword [esp + 0x28], eax
sub eax, 0
je 0x498f14
sub eax, 1
je 0x498efd
sub eax, 1
je 0x498ee6
mov eax, dword [esp + 0x10]
push eax
push 8
push ecx
lea eax, [edi + 0x780]
push eax
call dword [0x64d994]
jmp 0x498f29
mov edx, dword [esp + 0x10]
push edx
push 8
push ecx
lea eax, [edi + 0x780]
push eax
call dword [0x64d9bc]
jmp 0x498f29
mov eax, dword [esp + 0x10]
push eax
push 8
push ecx
lea eax, [edi + 0x780]
push eax
call dword [0x64d9b8]
jmp 0x498f29
mov edx, dword [esp + 0x10]
push edx
push 8
push ecx
lea eax, [edi + 0x780]
push eax
call dword [0x64d974]
mov ecx, dword [esp + 0x3c]
lea eax, [edi + 0x780]
mov dword [esp + 0x90], eax
add esi, ecx
add esi, dword [esp + 0x40]
lea eax, [edi + 0x7c0]
add esi, dword [edi + 0x870]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x38]
add esp, 0x10
sub eax, 0
je 0x498fd8
sub eax, 1
je 0x498fb2
sub eax, 1
je 0x498f8c
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
push edx
push 8
push esi
push eax
call dword [0x64d994]
mov ecx, dword [esp + 0x1c]
add esp, 0x10
mov dword [esp + 0x84], ecx
jmp 0x499113
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push ecx
push 8
push esi
push edx
call dword [0x64d9bc]
mov ecx, dword [esp + 0x1c]
add esp, 0x10
mov dword [esp + 0x84], ecx
jmp 0x499113
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push eax
push 8
push esi
push ecx
call dword [0x64d9b8]
mov ecx, dword [esp + 0x1c]
add esp, 0x10
mov dword [esp + 0x84], ecx
jmp 0x499113
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
push edx
push 8
push esi
push eax
call dword [0x64d974]
mov ecx, dword [esp + 0x1c]
add esp, 0x10
mov dword [esp + 0x84], ecx
jmp 0x499113
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
mov edx, ecx
mov esi, ecx
sar esi, 1
and edx, 3
movzx edx, word [edx*2 + 0x5faa38]
add edx, esi
mov esi, eax
and esi, 3
movzx esi, word [esi*2 + 0x5faa38]
mov edi, eax
sar edi, 1
add esi, edi
mov dword [esp + 0xc], esi
mov esi, eax
sar eax, 1
imul eax, ebx
and esi, 1
add esi, esi
mov edi, ecx
and edi, 1
or esi, edi
mov esi, dword [esp + esi*4 + 0x1b8]
add esi, eax
sar ecx, 1
add esi, ecx
lea eax, [esi + 8]
mov edi, dword [ebp + 8]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x88]
add eax, esi
lea ecx, [esi + ebx*8]
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x70], esi
mov esi, ecx
sar esi, 1
add esi, dword [esp + 0x68]
mov dword [esp + 0x7c], eax
imul esi, dword [esp + 0x10]
mov eax, edx
sar eax, 1
mov dword [esp + 0x2c], eax
add eax, esi
add eax, dword [esp + 0x30]
and edx, 1
add eax, dword [edi + 0x86c]
and ecx, 1
lea ecx, [ecx + edx*2]
mov dword [esp + 0x28], ecx
sub ecx, 0
je 0x499103
sub ecx, 1
je 0x4990e9
sub ecx, 1
je 0x4990cf
mov ecx, dword [esp + 0x10]
push ecx
push 8
push eax
lea eax, [edi + 0x780]
push eax
call dword [0x64d994]
jmp 0x498f29
mov edx, dword [esp + 0x10]
push edx
push 8
push eax
lea eax, [edi + 0x780]
push eax
call dword [0x64d9bc]
jmp 0x498f29
mov ecx, dword [esp + 0x10]
push ecx
push 8
push eax
lea eax, [edi + 0x780]
push eax
call dword [0x64d9b8]
jmp 0x498f29
mov edx, dword [esp + 0x10]
push edx
push 8
push eax
jmp 0x498f1c
mov edi, dword [ebp + 8]
mov esi, dword [esp + 0x34]
mov eax, dword [esi]
cmp eax, 0xffffffff
jne 0x499221
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x90]
push ebx
push ebx
push edx
push eax
call dword [0x64d974]
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0xa4]
push ebx
push ebx
push ecx
push edx
call dword [0x64d974]
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0xb8]
push ebx
push ebx
push eax
push ecx
call dword [0x64d974]
mov edx, dword [esp + 0xac]
mov eax, dword [esp + 0xcc]
push ebx
push ebx
push edx
push eax
call dword [0x64d974]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0xc0]
mov eax, dword [esp + 0xe0]
add esp, 0x40
push 8
push ecx
push edx
push eax
call dword [0x64d974]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x94]
mov eax, dword [esp + 0xb4]
push 8
push ecx
push edx
push eax
call dword [0x64d974]
mov eax, dword [edi + 0x818]
mov ecx, dword [edi + 0x810]
mov dword [esp + 0x40], eax
sar eax, 5
lea edx, [ecx + eax*4]
add esp, 0x20
mov dword [esp + 0x24], edx
mov ecx, 0x20
mov eax, 1
sub ecx, 1
shl eax, cl
mov ecx, dword [esp + 0x20]
xor edx, edx
and ecx, 0x1f
shrd edx, eax, cl
shr eax, cl
bswap edx
mov ecx, dword [esp + 0x24]
bswap eax
mov dword [ecx + 4], edx
or dword [ecx], eax
mov eax, dword [esp + 0x60]
add dword [edi + 0x818], 1
mov dword [esp + 0x6c], eax
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], 0
jmp 0x499453
cmp eax, 3
je 0x499343
cmp eax, 4
je 0x499343
mov eax, dword [edi + 0xb28]
mov ecx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x4c]
push ecx
lea edx, [esp + 0x98]
push edx
push edi
push eax
mov eax, ebx
lea ecx, [esp + 0x84]
call fcn.004a2780
mov ecx, dword [esp + 0x30]
add esp, 0x14
push eax
push ecx
push ebx
lea edx, [esp + 0x9c]
push edx
mov dword [esi + 0x60], eax
mov eax, dword [esp + 0x58]
push edi
push eax
lea ecx, [esp + 0x88]
call fcn.004a2e80
add esp, 0x18
cmp dword [edi + 0x918], 0
je 0x499318
mov eax, dword [edi + 0x818]
mov ecx, dword [edi + 0x810]
mov dword [esp + 0x20], eax
sar eax, 5
cmp dword [esi], 0xffffffff
lea edx, [ecx + eax*4]
mov dword [esp + 0x24], edx
jne 0x4992e7
mov ecx, 0x20
mov eax, 1
sub ecx, 1
shl eax, cl
mov ecx, dword [esp + 0x20]
xor edx, edx
and ecx, 0x1f
shrd edx, eax, cl
shr eax, cl
bswap edx
mov ecx, dword [esp + 0x24]
bswap eax
mov dword [ecx + 4], edx
or dword [ecx], eax
add dword [edi + 0x818], 1
jmp 0x499453
mov ecx, 0x20
mov eax, 0
sub ecx, 1
shl eax, cl
mov ecx, dword [esp + 0x20]
xor edx, edx
and ecx, 0x1f
shrd edx, eax, cl
shr eax, cl
bswap edx
mov ecx, dword [esp + 0x24]
bswap eax
mov dword [ecx + 4], edx
or dword [ecx], eax
add dword [edi + 0x818], 1
mov eax, dword [esi]
cmp eax, 3
je 0x499334
cmp eax, 4
je 0x499334
push esi
mov esi, edi
call fcn.00497c70
add esp, 4
jmp 0x499453
mov ebx, esi
call fcn.00497950
mov edi, dword [ebp + 8]
jmp 0x49944f
mov eax, dword [edi + 0xb28]
mov ecx, dword [esp + 0x48]
push eax
push edi
mov edi, dword [esp + 0x24]
push ecx
mov eax, ebx
lea ecx, [esp + 0x9c]
call fcn.004a23f0
mov edx, dword [esp + 0x54]
add esp, 0xc
push ebx
mov eax, edi
mov edi, dword [ebp + 8]
push edx
lea ebx, [esp + 0x98]
call fcn.004a2c90
mov eax, dword [edi + 0x834]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x6c]
push eax
push ecx
mov ecx, dword [edi + 0x8b8]
push edx
mov edx, dword [esp + 0x5c]
call fcn.004a07b0
add esp, 0x14
cmp dword [edi + 0x918], 0
je 0x49942f
mov eax, dword [edi + 0x818]
mov ecx, dword [edi + 0x810]
mov dword [esp + 0x20], eax
sar eax, 5
cmp dword [esi], 0xffffffff
lea edx, [ecx + eax*4]
mov dword [esp + 0x24], edx
jne 0x4993fe
mov ecx, 0x20
mov eax, 1
sub ecx, 1
shl eax, cl
mov ecx, dword [esp + 0x20]
xor edx, edx
and ecx, 0x1f
shrd edx, eax, cl
shr eax, cl
bswap edx
mov ecx, dword [esp + 0x24]
bswap eax
mov dword [ecx + 4], edx
or dword [ecx], eax
add dword [edi + 0x818], 1
jmp 0x49944f
mov ecx, 0x20
mov eax, 0
sub ecx, 1
shl eax, cl
mov ecx, dword [esp + 0x20]
xor edx, edx
and ecx, 0x1f
shrd edx, eax, cl
shr eax, cl
bswap edx
mov ecx, dword [esp + 0x24]
bswap eax
mov dword [ecx + 4], edx
or dword [ecx], eax
add dword [edi + 0x818], 1
mov eax, dword [esi]
cmp eax, 3
je 0x499448
cmp eax, 4
je 0x499448
push esi
mov esi, edi
call fcn.00497c70
add esp, 4
jmp 0x49944f
mov ebx, esi
call fcn.00497950
mov ebx, dword [esp + 0x40]
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x14]
add eax, 0x10
cmp eax, dword [edi + 0x82c]
mov dword [esp + 0x14], eax
jl 0x49844a
mov eax, dword [esp + 0x18]
add eax, 0x10
cmp eax, dword [edi + 0x830]
mov dword [esp + 0x18], eax
jl 0x498402
mov eax, dword [edi + 0x818]
mov ecx, eax
and ecx, reloc.OLEAUT32.dll_VariantInit
jns 0x49949e
dec ecx
or ecx, 0xfffffff8
inc ecx
mov edx, dword [edi + 0x810]
mov dword [esp + 0x20], eax
mov esi, 8
sar eax, 5
sub esi, ecx
lea eax, [edx + eax*4]
mov dword [esp + 0x54], esi
mov dword [esp + 0x24], eax
mov ecx, 0x20
mov eax, 0
sub ecx, dword [esp + 0x54]
shl eax, cl
mov ecx, dword [esp + 0x20]
xor edx, edx
and ecx, 0x1f
shrd edx, eax, cl
shr eax, cl
bswap edx
mov ecx, dword [esp + 0x24]
bswap eax
mov dword [ecx + 4], edx
or dword [ecx], eax
add dword [edi + 0x818], esi
mov eax, dword [edi + 0x818]
add eax, 7
cdq
and edx, 7
pop edi
add eax, edx
pop esi
sar eax, 3
pop ebx
mov esp, ebp
pop ebp
ret