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

Disassembly:
sub esp, 0x4c
test eax, eax
push ebx
push ebp
mov ebp, dword [esp + 0x5c]
push esi
push edi
je 0x47670d
mov ecx, dword [esp + 0x60]
push ebp
push ecx
call fcn.00476590
add esp, 8
test byte [0x85c164], 4
jne 0x476813
mov edx, dword [esp + 0x60]
lea esi, [ebp + edx*4]
imul esi, esi, 0x4a8
lea eax, [esi + 0x8be63c]
mov ecx, 0x59
mov edx, dword [eax - 4]
mov dword [eax], edx
mov edx, dword [eax + 0x164]
mov dword [eax + 0x168], edx
mov edx, dword [eax + 0x2cc]
mov dword [eax + 0x2d0], edx
add eax, 0xfffffffc
dec ecx
jne 0x476733
mov eax, dword [esi + 0x8be468]
imul eax, eax, 0x44
mov ecx, dword [eax + 0x725b08]
imul ecx, ecx, 0x3e8
mov ebx, dword [esi + 0x8be474]
mov eax, 0x51eb851f
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edi, eax
sar edi, 2
mov eax, edi
mov ecx, ebx
call fcn.004dcac0
mov ecx, dword [esi + 0x8be46c]
mov dword [esp + 0x64], eax
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esp + 0x64]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d4]
sar eax, 2
add ecx, edx
add eax, ecx
mov dword [esi + 0x8be4d8], eax
lea ecx, [ebx + 0x40000000]
mov eax, edi
call fcn.004dcac0
mov ecx, dword [esi + 0x8be470]
mov edi, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [0x8bb9d0]
sar eax, 2
add edi, edx
add eax, edi
mov dword [esi + 0x8be640], eax
mov dword [esi + 0x8be7a8], ebx
mov eax, dword [esp + 0x68]
cdq
mov ecx, 0xf
idiv ecx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x60]
lea edi, [ebp + edx*4]
mov ebx, edi
imul ebx, ebx, 0x4a8
mov eax, dword [ebx + 0x8be4d8]
mov ecx, dword [ebx + 0x8be640]
mov edx, dword [ebx + 0x8be7a8]
mov dword [esp + 0x10], eax
xor eax, eax
xor ebp, ebp
imul edi, edi, 0x12a
mov dword [esp + 0x30], ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x34], edi
jmp 0x476875
mov edi, dword [esp + 0x34]
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x2c]
mov ecx, eax
imul ecx, ecx, 0xf
add ecx, edx
cmp eax, 6
lea edx, [ecx - 0xf]
lea esi, [eax + 2]
mov dword [esp + 0x60], edx
mov dword [esp + 0x20], ecx
jne 0x4768bc
mov ecx, dword [esp + 0x2c]
imul ecx, ecx, 0x3e8
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 3
mov ebp, edx
mov dword [esp + 0x20], 0x59
mov ecx, dword [esp + 0x20]
shr ebp, 0x1f
add ebp, edx
lea eax, [edi + ecx]
shl eax, 2
mov edx, dword [eax + 0x8be7a8]
mov dword [esp + 0x64], edx
mov edx, dword [eax + 0x8be4d8]
mov eax, dword [eax + 0x8be640]
mov dword [esp + 0x68], edx
mov edx, dword [ebx + 0x8be468]
imul edx, edx, 0x44
mov ebx, dword [edx + 0x725b08]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x60]
lea edx, [ebx + eax]
imul edx, edx, 0x3e8
mov eax, 0x2aaaaaab
imul edx
sar edx, 1
mov edi, edx
shr edi, 0x1f
add edi, edx
mov eax, 0x88888889
imul edi
add edx, edi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
lea edx, [ebx + ecx]
imul edx, edx, 0x3e8
mov edi, eax
mov eax, 0x2aaaaaab
imul edx
sar edx, 1
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
mov eax, 0x88888889
imul ebx
add edx, ebx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov ebx, eax
mov eax, dword [esp + 0x1c]
sar edi, 2
sar ebx, 2
test eax, eax
jne 0x47697a
mov eax, ebx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov dword [esp + 0x60], 0
mov ecx, dword [esp + 0x28]
add ecx, 0xc0000000
mov eax, edi
mov dword [esp + 0x24], ecx
call fcn.004dcac0
add eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x40], eax
add ecx, 0x40000000
mov eax, edi
call fcn.004dcac0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
add eax, edx
mov dword [esp + 0x50], eax
add ecx, 0x40000000
mov eax, edi
mov dword [esp + 0x28], ecx
call fcn.004dcac0
add eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x44], eax
add ecx, 0x40000000
mov eax, edi
call fcn.004dcac0
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x64]
add eax, edx
mov dword [esp + 0x54], eax
add edi, 0x40000000
mov eax, ebx
mov ecx, edi
call fcn.004dcac0
add eax, dword [esp + 0x68]
mov dword [esp + 0x48], eax
lea ecx, [edi + 0x40000000]
mov eax, ebx
call fcn.004dcac0
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x64]
add eax, edx
mov dword [esp + 0x58], eax
add edi, 0xc0000000
mov eax, ebx
mov ecx, edi
call fcn.004dcac0
add eax, dword [esp + 0x68]
mov dword [esp + 0x3c], eax
lea ecx, [edi + 0x40000000]
mov eax, ebx
call fcn.004dcac0
mov ecx, dword [esp + 0x20]
add eax, dword [esp + 0x14]
mov edi, 0x5a
sub edi, ecx
mov dword [esp + 0x4c], eax
lea ecx, [edi + edi*4]
shl ecx, 5
mov eax, 0xb60b60b7
imul ecx
add edx, ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [esp + 0x60]
mov ebx, 0x5a
sub ebx, edx
lea edx, [ebx + ebx*4]
shl ecx, 0x18
shl edx, 5
mov dword [esp + 0x38], edx
mov eax, 0xb60b60b7
or ecx, 0xffffff
imul edx
mov eax, dword [esp + 0x38]
push ecx
add edx, eax
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x4c]
shl eax, 0x18
or eax, 0xffffff
push eax
push eax
push ecx
push ebp
mov ecx, dword [esp + 0x6c]
push 0x3e8
push 0x3e8
mov eax, dword [esp + 0x70]
push 0x3e8
push 0x3e8
push 0
push ebp
push 0
push esi
push ecx
mov ecx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x8c]
push esi
push eax
mov eax, dword [esp + 0x84]
push ecx
mov ecx, dword [esp + 0x94]
push esi
push edx
mov edx, dword [esp + 0x8c]
push eax
push esi
push ecx
mov ecx, dword [0x862970]
push edx
call fcn.004bf090
imul edi, edi, 0xff
imul ebx, ebx, 0xff
mov eax, 0xb60b60b7
imul edi
add edx, edi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edi, eax
mov eax, 0xb60b60b7
imul ebx
add edx, ebx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [esp + 0x58]
shl edi, 0x18
or edi, 0xffffff
push edi
mov eax, ecx
shl eax, 0x18
or eax, 0xffffff
push eax
push eax
mov eax, dword [esp + 0x54]
push edi
push ebp
push 0x3e8
push 0x3e8
push 0x3e8
push 0x3e8
push 0
push ebp
push 0
push esi
push edx
push eax
push esi
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x90]
push ecx
mov ecx, dword [esp + 0x84]
push edx
mov edx, dword [esp + 0x94]
push esi
push eax
mov eax, dword [esp + 0x8c]
push ecx
mov ecx, dword [0x862974]
push esi
push edx
push eax
call fcn.004bf090
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx + 0x8be468]
mov eax, dword [esp + 0x60]
imul edx, edx, 0x44
mov ecx, dword [edx + 0x725b08]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x38], ecx
lea ecx, [eax + ecx + 8]
imul ecx, ecx, 0x3e8
mov eax, 0x66666667
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 3
mov ecx, dword [esp + 0x38]
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
mov ebx, eax
mov eax, dword [esp + 0x20]
cdq
sub eax, edx
sar eax, 1
lea ecx, [eax + ecx + 8]
imul ecx, ecx, 0x3e8
mov eax, 0x66666667
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
mov ecx, dword [esp + 0x1c]
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
sar ebx, 2
test ecx, ecx
mov dword [esp + 0x20], eax
jne 0x476c6f
mov ebx, eax
mov dword [esp + 0x60], 0
mov ecx, dword [esp + 0x24]
mov eax, ebx
call fcn.004dcac0
add eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x40], eax
add ecx, 0x40000000
mov eax, ebx
call fcn.004dcac0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
add eax, edx
mov dword [esp + 0x50], eax
mov eax, ebx
call fcn.004dcac0
add eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x44], eax
add ecx, 0x40000000
mov eax, ebx
call fcn.004dcac0
mov ecx, dword [esp + 0x64]
mov ebx, eax
add ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
add ecx, 0x40000000
call fcn.004dcac0
add eax, dword [esp + 0x68]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x64]
add eax, 0x40000000
lea ecx, [eax + 0x40000000]
mov eax, dword [esp + 0x20]
call fcn.004dcac0
add eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x20]
add ecx, 0xc0000000
mov dword [esp + 0x38], ecx
call fcn.004dcac0
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x38]
add eax, edx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
add ecx, 0x40000000
call fcn.004dcac0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x60]
add eax, ecx
mov ecx, 0x5a
sub ecx, edx
imul ecx, ecx, 0xff
mov dword [esp + 0x4c], eax
mov eax, 0xb60b60b7
imul ecx
add edx, ecx
sar edx, 6
push edi
mov eax, edx
shr eax, 0x1f
add eax, edx
shl eax, 0x18
or eax, 0xffffff
push eax
push eax
push edi
push ebp
push 0x3e8
push 0x3e8
push 0x3e8
push 0x3e8
push 0
push ebp
push 0
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x74]
push esi
push ecx
mov ecx, dword [esp + 0x88]
push edx
mov edx, dword [esp + 0x7c]
push esi
push ebx
push eax
mov eax, dword [esp + 0x94]
push esi
push ecx
mov ecx, dword [esp + 0x8c]
push edx
push esi
push eax
push ecx
mov ecx, dword [0x862974]
call fcn.004bf090
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
inc eax
cmp eax, 7
mov dword [esp + 0x28], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
jl 0x476869
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret