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

Disassembly:
sub esp, 0x184
mov eax, dword [0x570f20]
xor eax, esp
mov dword [esp + 0x180], eax
mov ecx, dword [esp + 0x18c]
mov eax, dword [esp + 0x190]
mov edx, dword [esp + 0x194]
mov dword [esp + 0x2c], ecx
mov ecx, dword [ecx + 0x40]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + 0x1c]
push ebx
mov ebx, dword [eax + 0x510]
push ebp
mov ebp, dword [eax + 0x504]
push esi
mov esi, dword [esp + 0x194]
push edi
mov edi, dword [esp + 0x1a8]
mov dword [esp + 0x44], ecx
mov ecx, dword [ecx + 0xb20]
mov dword [esp + 0x34], esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x40], edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x48], ecx
test edx, edx
je 0x47823b
xor edi, edi
test ebp, ebp
jle 0x477dbd
mov esi, dword [edx + edi*4]
mov eax, dword [ebx + 0x340]
mov ecx, esi
dec eax
and ecx, 0x7fff
cmp eax, 3
ja case.default.0x477d7b
jmp dword [eax*4 + 0x47827c]
sar ecx, 2
jmp case.default.0x477d7b
sar ecx, 3
jmp case.default.0x477d7b
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [esp + 0x30]
jmp case.default.0x477d7b
sar ecx, 4
and esi, 0x8000
or esi, ecx
mov dword [edx + edi*4], esi
inc edi
cmp edi, ebp
jl 0x477d64
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
mov ecx, dword [edx]
mov dword [esp + 0x8c], ecx
mov ecx, dword [edx + 4]
mov dword [esp + 0x90], ecx
cmp ebp, 2
jle 0x477f0d
lea ecx, [edx + 8]
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x8c]
add ebx, 0x34c
add eax, 0x30c
sub ecx, edx
add ebp, 0xfffffffe
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x28], ebp
jmp 0x477e14
mov eax, dword [esp + 0x18]
mov ebp, dword [eax + 0xfc]
mov ebx, dword [eax]
mov eax, dword [esp + 0x30]
mov esi, dword [eax + ebp*4]
mov ecx, dword [eax + ebx*4]
mov edx, dword [esp + 0x1c]
mov edi, dword [edx + ebp*4 + 0x344]
and esi, 0x7fff
and ecx, 0x7fff
sub ecx, esi
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x10]
mov edx, dword [edx]
sub edx, edi
imul eax, edx
mov edx, dword [esp + 0x1c]
mov edx, dword [edx + ebx*4 + 0x344]
sub edx, edi
mov dword [esp + 0x20], edx
cdq
idiv dword [esp + 0x20]
test ecx, ecx
jns 0x477e71
mov ecx, esi
sub ecx, eax
jmp 0x477e74
lea ecx, [eax + esi]
mov edi, dword [esp + 0x2c]
mov eax, dword [edi]
test eax, 0x8000
jne 0x477ed5
cmp ecx, eax
je 0x477ed5
mov edx, dword [esp + 0x24]
mov edx, dword [edx + 0x50c]
sub edx, ecx
cmp edx, ecx
jl 0x477e97
mov edx, ecx
sub eax, ecx
jns 0x477eb4
mov ecx, edx
neg ecx
cmp eax, ecx
jge 0x477eaa
sub edx, eax
lea eax, [edx - 1]
jmp 0x477ebe
lea edx, [eax + eax]
or eax, 0xffffffff
sub eax, edx
jmp 0x477ebe
cmp eax, edx
jl 0x477ebc
add eax, edx
jmp 0x477ebe
add eax, eax
mov ecx, dword [esp + 0x14]
mov dword [ecx + edi], eax
mov eax, dword [esp + 0x30]
mov dword [eax + ebp*4], esi
and dword [eax + ebx*4], 0x7fff
jmp 0x477ee8
mov edx, dword [esp + 0x14]
or ecx, 0x8000
mov dword [edi], ecx
mov dword [edx + edi], 0
mov eax, 4
add dword [esp + 0x18], eax
add dword [esp + 0x10], eax
add edi, eax
dec dword [esp + 0x28]
mov dword [esp + 0x2c], edi
jne 0x477e10
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x34]
push 1
push 1
push esi
call fcn.00479a10
mov edi, dword [esp + 0x30]
mov eax, dword [edi + 0x50c]
inc dword [edi + 0x51c]
dec eax
push eax
call fcn.00471b30
mov ecx, dword [edi + 0x50c]
dec ecx
add eax, eax
add dword [edi + 0x518], eax
push ecx
call fcn.00471b30
mov edx, dword [esp + 0xa0]
push eax
push edx
push esi
call fcn.00479a10
mov eax, dword [edi + 0x50c]
dec eax
push eax
call fcn.00471b30
mov ecx, dword [esp + 0xb4]
push eax
push ecx
push esi
call fcn.00479a10
add esp, 0x30
cmp dword [ebx], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x10], 2
jle 0x478165
lea edx, [ebx + 4]
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
mov ecx, dword [ebx + edx*4 + 0x80]
mov ebp, dword [ebx + edx*4 + 0xc0]
xor edi, edi
mov dword [esp + 0x18], ecx
mov esi, 1
mov ecx, ebp
shl esi, cl
mov dword [esp + 0x38], edx
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], edi
mov dword [esp + 0x80], edi
mov dword [esp + 0x84], edi
mov dword [esp + 0x88], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x1c], edi
cmp ebp, edi
je 0x4780de
xor eax, eax
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], edi
cmp esi, edi
jle 0x47804c
add edx, 0xa
shl edx, 5
add edx, ebx
nop
mov edi, dword [edx]
test edi, edi
jns 0x478030
mov dword [esp + eax*4 + 0x4c], 1
jmp 0x478042
mov ecx, dword [esp + 0x44]
mov ecx, dword [ecx + edi*4 + 0x720]
mov ecx, dword [ecx + 4]
mov dword [esp + eax*4 + 0x4c], ecx
inc eax
add edx, 4
cmp eax, esi
jl 0x478020
xor edi, edi
xor edx, edx
cmp dword [esp + 0x18], edi
jle 0x47809f
mov eax, dword [esp + 0x10]
lea ecx, [esp + eax*4 + 0x8c]
mov dword [esp + 0x28], ecx
xor eax, eax
cmp esi, edi
jle 0x478081
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
nop
cmp ecx, dword [esp + eax*4 + 0x4c]
jl 0x47807d
inc eax
cmp eax, esi
jl 0x478070
jmp 0x478081
mov dword [esp + edx*4 + 0x6c], eax
mov eax, dword [esp + edx*4 + 0x6c]
mov ecx, dword [esp + 0x1c]
add dword [esp + 0x1c], ebp
add dword [esp + 0x28], 4
shl eax, cl
inc edx
or dword [esp + 0x2c], eax
cmp edx, dword [esp + 0x18]
jl 0x478063
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
mov eax, dword [ebx + eax*4 + 0x100]
mov edx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x48]
push ecx
lea ecx, [eax*8]
push edx
sub ecx, eax
lea edx, [ebp + ecx*8]
push edx
call fcn.00472df0
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x44]
add esp, 0xc
add dword [ecx + 0x514], eax
jmp 0x4780e2
mov ebp, dword [esp + 0x48]
xor esi, esi
cmp dword [esp + 0x18], edi
jle 0x478147
mov edi, dword [esp + 0x10]
lea eax, [edx*8 + 0x50]
mov dword [esp + 0x38], eax
lea edi, [esp + edi*4 + 0x8c]
mov ecx, dword [esp + esi*4 + 0x6c]
add ecx, dword [esp + 0x38]
mov eax, dword [ebx + ecx*4]
test eax, eax
js 0x47813d
mov ecx, dword [edi]
lea edx, [eax*8]
sub edx, eax
cmp ecx, dword [ebp + edx*8 + 4]
lea eax, [ebp + edx*8]
jge 0x47813d
mov edx, dword [esp + 0x34]
push edx
push ecx
push eax
call fcn.00472df0
mov ecx, dword [esp + 0x30]
add esp, 0xc
add dword [ecx + 0x518], eax
inc esi
add edi, 4
cmp esi, dword [esp + 0x18]
jl 0x478100
mov eax, dword [esp + 0x18]
add dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
add dword [esp + 0x14], 4
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [ebx]
jl 0x477f91
mov edx, dword [esp + 0x3c]
mov eax, dword [edx + 0x1c]
mov edx, dword [esp + 0x44]
mov eax, dword [edx + eax*4]
mov ecx, dword [esp + 0x30]
mov ecx, dword [ecx]
imul ecx, dword [ebx + 0x340]
cdq
sub eax, edx
mov ebp, eax
mov eax, dword [esp + 0x24]
mov edx, 1
xor edi, edi
sar ebp, 1
mov dword [esp + 0x20], edi
mov dword [esp + 0x10], edx
cmp dword [eax + 0x504], edx
jle 0x47820f
add eax, 0x108
mov dword [esp + 0x14], eax
jmp 0x4781b0
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
mov eax, dword [esp + 0x30]
mov esi, dword [eax + edx*4]
mov eax, esi
and eax, 0x7fff
cmp eax, esi
jne 0x4781f5
mov esi, dword [ebx + 0x340]
mov edi, dword [ebx + edx*4 + 0x344]
imul esi, eax
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x20]
push edx
push ecx
push edi
push eax
push ebp
mov eax, esi
call fcn.00476b10
add esp, 0x14
mov dword [esp + 0x20], edi
mov ecx, esi
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x24]
add dword [esp + 0x14], 4
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [edx + 0x504]
jl 0x4781b0
mov esi, dword [esp + 0x3c]
mov eax, dword [esi + 0x24]
cdq
sub eax, edx
sar eax, 1
cmp edi, eax
jge 0x478234
nop
mov eax, dword [esp + 0x40]
mov dword [eax + edi*4], ecx
mov eax, dword [esi + 0x24]
cdq
sub eax, edx
inc edi
sar eax, 1
cmp edi, eax
jl 0x478220
mov eax, 1
jmp 0x478263
push 1
push 0
push esi
call fcn.00479a10
mov ecx, dword [esp + 0x48]
mov eax, dword [ecx + 0x24]
cdq
sub eax, edx
sar eax, 1
add eax, eax
add eax, eax
push eax
push 0
push edi
call fcn.004a6ff0
add esp, 0x18
xor eax, eax
mov ecx, dword [esp + 0x190]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004a7314
add esp, 0x184
ret