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

Disassembly:
sub esp, 0x58
push ebx
push esi
push edi
xor esi, esi
push ebp
call fcn.004a7f30
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x46d8b4
mov eax, dword [ecx]
call dword [eax + 0xc8]
test eax, eax
je 0x46d8b4
mov ecx, eax
call fcn.004a7ff0
mov edi, eax
test edi, edi
je 0x46d8b4
push 0x4b2c10
mov ecx, edi
call fcn.004a7e7c
test eax, eax
je 0x46d8b4
mov esi, dword [edi + 0x40]
mov eax, dword [esp + 0x78]
mov byte [esp + 0x17], al
mov byte [esp + 0x16], ah
shr eax, 0x10
mov byte [esp + 0x15], al
mov eax, dword [esp + 0x7c]
mov byte [esp + 0x14], al
mov byte [esp + 0x13], ah
shr eax, 0x10
test esi, esi
mov byte [esp + 0x12], al
je 0x46d928
cmp word [esi + 0xfc], 0x18
je 0x46d928
lea eax, [esp + 0x15]
push 1
lea ecx, [esp + 0x1a]
push eax
lea edx, [esp + 0x1f]
push ecx
push edx
mov eax, dword [esi + 0xf0]
push eax
call fcn.004638c0
lea ecx, [esp + 0x26]
lea edx, [esp + 0x27]
lea eax, [esp + 0x28]
add esp, 0x14
push 1
push ecx
push edx
mov ecx, dword [esi + 0xf0]
push eax
push ecx
call fcn.004638c0
add esp, 0x14
mov ax, 0x1c2
sub ax, word [esp + 0x80]
cmp ax, 0x168
jle 0x46d93e
sub ax, 0x168
movsx eax, ax
mov ebp, dword [esp + 0x6c]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
lea ecx, [ebp + ebp*2]
lea eax, [ecx*8 + 0x1f]
mov ebx, dword [esp + 0x70]
cdq
fstp qword [esp + 0x18]
and edx, 0x1f
add eax, edx
sar eax, 5
imul ebx, eax
mov dword [esp + 0x30], eax
lea eax, [ebx*4 + 0x28]
push eax
push 0x42
call dword [0x4c2588]
mov dword [esp + 0x58], eax
push eax
call dword [0x4c258c]
mov dword [eax], 0x28
mov esi, eax
mov eax, dword [esp + 0x70]
xor edi, edi
shl ebx, 2
mov dword [esi + 4], ebp
mov dword [esi + 8], eax
mov word [esi + 0xc], 1
mov word [esi + 0xe], 0x18
mov dword [esi + 0x10], edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x30]
mov dword [esi + 0x14], ebx
shl ax, 2
mov dword [esi + 0x18], edi
mov word [esp + 0x3c], ax
xor ebx, ebx
mov eax, dword [esp + 0x70]
mov dword [esi + 0x1c], edi
mov dword [esi + 0x20], edi
mov dword [esp + 0x24], ebp
cdq
xor eax, edx
mov dword [esi + 0x24], edi
sub eax, edx
and eax, 1
xor eax, edx
sub eax, edx
je 0x46d9f7
mov eax, dword [esp + 0x70]
mov ebx, 1
inc eax
mov dword [esp + 0x20], eax
mov eax, ebp
cdq
xor eax, edx
sub eax, edx
and eax, 1
xor eax, edx
sub eax, edx
je 0x46da11
inc ebp
mov edi, 1
mov dword [esp + 0x24], ebp
fldz
fcomp qword [esp + 0x18]
fnstsw ax
test ah, 0x41
je 0x46da56
fld qword [esp + 0x18]
fcomp qword [0x4b0bd0]
fnstsw ax
test ah, 0x41
je 0x46da56
fld qword [esp + 0x18]
fmul qword [0x4b0bd8]
mov eax, dword [esp + 0x20]
cdq
fsubr qword [0x4b0be0]
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
fimul dword [esp + 0x18]
jmp 0x46dd8d
fld qword [esp + 0x18]
fcomp qword [0x4b0bd0]
fnstsw ax
test ah, 0x41
jne 0x46dab0
fld qword [esp + 0x18]
fcomp qword [0x4b0be8]
fnstsw ax
test ah, 0x41
je 0x46dab0
fld qword [esp + 0x18]
fsub qword [0x4b0bd0]
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x24]
fmul qword [0x4b0bd8]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
fimul dword [esp + 0x18]
call 0x4a8cd0
mov dword [esp + 0x2c], eax
jmp 0x46dd9e
fld qword [esp + 0x18]
fcomp qword [0x4b0be8]
fnstsw ax
test ah, 0x41
jne 0x46db10
fld qword [esp + 0x18]
fcomp qword [0x4b0bf0]
fnstsw ax
test ah, 0x41
je 0x46db10
fld qword [esp + 0x18]
fsub qword [0x4b0be8]
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x24]
fmul qword [0x4b0bd8]
cdq
fadd qword [0x4b0be0]
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
fimul dword [esp + 0x18]
call 0x4a8cd0
mov dword [esp + 0x2c], eax
jmp 0x46dd9e
fld qword [esp + 0x18]
fcomp qword [0x4b0bf0]
fnstsw ax
test ah, 0x41
jne 0x46db9e
fld qword [esp + 0x18]
fcomp qword [0x4b0bf8]
fnstsw ax
test ah, 0x41
je 0x46db9e
fld qword [esp + 0x18]
fsub qword [0x4b0bf0]
mov eax, dword [esp + 0x20]
cdq
fmul qword [0x4b0bd8]
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
fimul dword [esp + 0x18]
fisubr dword [esp + 0x20]
call 0x4a8cd0
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x16]
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x28], eax
mov al, byte [esp + 0x15]
mov byte [esp + 0x15], cl
mov byte [esp + 0x12], al
mov al, byte [esp + 0x13]
mov cl, byte [esp + 0x14]
mov byte [esp + 0x16], al
mov byte [esp + 0x13], dl
mov dl, byte [esp + 0x17]
mov byte [esp + 0x17], cl
mov byte [esp + 0x14], dl
jmp 0x46dd9e
fld qword [esp + 0x18]
fcomp qword [0x4b0bf8]
fnstsw ax
test ah, 0x41
jne 0x46dc2e
fld qword [esp + 0x18]
fcomp qword [0x4b0c00]
fnstsw ax
test ah, 0x41
je 0x46dc2e
fld qword [esp + 0x18]
fsub qword [0x4b0bf8]
mov eax, dword [esp + 0x20]
cdq
fmul qword [0x4b0bd8]
sub eax, edx
sar eax, 1
fsubr qword [0x4b0be0]
mov dword [esp + 0x18], eax
fimul dword [esp + 0x18]
call 0x4a8cd0
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x16]
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x28], eax
mov al, byte [esp + 0x15]
mov byte [esp + 0x15], cl
mov byte [esp + 0x12], al
mov al, byte [esp + 0x13]
mov cl, byte [esp + 0x14]
mov byte [esp + 0x16], al
mov byte [esp + 0x13], dl
mov dl, byte [esp + 0x17]
mov byte [esp + 0x17], cl
mov byte [esp + 0x14], dl
jmp 0x46dd9e
fld qword [esp + 0x18]
fcomp qword [0x4b0c00]
fnstsw ax
test ah, 0x41
jne 0x46dcb8
fld qword [esp + 0x18]
fcomp qword [0x4b0c08]
fnstsw ax
test ah, 0x41
je 0x46dcb8
fld qword [esp + 0x18]
fsub qword [0x4b0c00]
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x24]
fmul qword [0x4b0bd8]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
fimul dword [esp + 0x18]
call 0x4a8cd0
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x16]
mov dword [esp + 0x2c], eax
mov al, byte [esp + 0x15]
mov byte [esp + 0x15], cl
mov byte [esp + 0x12], al
mov al, byte [esp + 0x13]
mov cl, byte [esp + 0x14]
mov byte [esp + 0x16], al
mov byte [esp + 0x13], dl
mov dl, byte [esp + 0x17]
mov byte [esp + 0x17], cl
mov byte [esp + 0x14], dl
jmp 0x46dd9e
fld qword [esp + 0x18]
fcomp qword [0x4b0c08]
fnstsw ax
test ah, 0x41
jne 0x46dd45
fld qword [esp + 0x18]
fcomp qword [0x4b0c10]
fnstsw ax
test ah, 0x41
je 0x46dd45
fld qword [esp + 0x18]
fsub qword [0x4b0c08]
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x24]
fmul qword [0x4b0bd8]
cdq
fadd qword [0x4b0be0]
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
fimul dword [esp + 0x18]
call 0x4a8cd0
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x16]
mov dword [esp + 0x2c], eax
mov al, byte [esp + 0x15]
mov byte [esp + 0x15], cl
mov byte [esp + 0x12], al
mov al, byte [esp + 0x13]
mov cl, byte [esp + 0x14]
mov byte [esp + 0x16], al
mov byte [esp + 0x13], dl
mov dl, byte [esp + 0x17]
mov byte [esp + 0x17], cl
mov byte [esp + 0x14], dl
jmp 0x46dd9e
fld qword [esp + 0x18]
fcomp qword [0x4b0c10]
fnstsw ax
test ah, 0x41
jne 0x46dd9e
fld qword [esp + 0x18]
fcomp qword [0x4b0c18]
fnstsw ax
test ah, 0x41
je 0x46dd9e
fld qword [esp + 0x18]
fsub qword [0x4b0c10]
mov eax, dword [esp + 0x20]
cdq
fmul qword [0x4b0bd8]
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
fimul dword [esp + 0x18]
fisubr dword [esp + 0x20]
call 0x4a8cd0
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x28], eax
xor eax, eax
xor ecx, ecx
mov al, byte [esp + 0x15]
mov cl, byte [esp + 0x12]
sub eax, ecx
xor ecx, ecx
mov cl, byte [esp + 0x13]
mov dword [esp + 0x5c], eax
xor eax, eax
mov al, byte [esp + 0x16]
sub eax, ecx
xor ecx, ecx
mov cl, byte [esp + 0x14]
mov dword [esp + 0x60], eax
xor eax, eax
mov al, byte [esp + 0x17]
sub eax, ecx
mov dword [esp + 0x64], eax
mov eax, dword [esi + 0x20]
shl eax, 2
add eax, dword [esi]
add eax, esi
mov esi, eax
mov dword [esp + 0x50], eax
cmp dword [esp + 0x28], 0xffffffff
je 0x46dfee
cmp dword [esp + 0x28], 0
jne 0x46de1e
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0x3ff00000
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
sub eax, 2
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jmp 0x46deae
mov eax, dword [esp + 0x20]
cdq
sub eax, edx
sar eax, 1
cmp dword [esp + 0x28], eax
jge 0x46de48
fild dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
add ecx, ecx
sub eax, ecx
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jmp 0x46de98
jne 0x46de63
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jmp 0x46deae
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x20], eax
jne 0x46de82
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
sub eax, 2
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jmp 0x46deae
fild dword [esp + 0x24]
mov eax, dword [esp + 0x28]
add eax, eax
sub eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fdiv st(1)
fstp qword [esp + 0x30]
fild dword [esp + 0x20]
fmul qword [esp + 0x30]
faddp st(1)
fsub qword [0x4b0be0]
fstp qword [esp + 0x18]
fld qword [esp + 0x30]
fmul qword [0x4b0c20]
call 0x4a8cd0
fld qword [esp + 0x18]
mov dword [esp + 0x38], eax
call 0x4a8cd0
mov ebp, eax
test ebx, ebx
je 0x46ded8
dec dword [esp + 0x20]
test edi, edi
je 0x46dee0
dec dword [esp + 0x24]
cmp dword [esp + 0x20], 0
jle 0x46e1f3
mov dword [esp + 0x44], 0
mov eax, dword [esp + 0x20]
imul eax, dword [esp + 0x38]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x20]
shl eax, 8
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x54], ecx
mov eax, dword [esp + 0x3c]
and eax, 0xffff
mov dword [esp + 0x3c], eax
cmp dword [esp + 0x24], 0
jle 0x46dfbf
mov ebx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x44]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
cdq
sub eax, edx
mov dword [esp + 0x30], ecx
sar eax, 1
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x28], eax
jg 0x46df5f
mov eax, edi
jmp 0x46df71
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x20], eax
je 0x46df6f
mov eax, dword [esp + 0x40]
jmp 0x46df71
mov eax, ebx
mov cl, byte [esp + 0x15]
inc esi
inc esi
add ebx, 0x100
inc esi
add edi, 0x100
cdq
idiv ebp
mov edx, eax
add dword [esp + 0x40], 0x100
imul edx, dword [esp + 0x5c]
sub cl, dh
mov edx, eax
imul edx, dword [esp + 0x60]
imul eax, dword [esp + 0x64]
mov byte [esi - 3], cl
mov cl, byte [esp + 0x16]
sub cl, dh
mov byte [esi - 2], cl
mov cl, byte [esp + 0x17]
sub cl, ah
dec dword [esp + 0x30]
mov byte [esi - 1], cl
jne 0x46df51
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
add dword [esp + 0x50], eax
add dword [esp + 0x44], ecx
mov esi, dword [esp + 0x50]
sub dword [esp + 0x48], ecx
sub dword [esp + 0x4c], 0x100
dec dword [esp + 0x54]
jne 0x46df20
jmp 0x46e1f3
cmp dword [esp + 0x2c], 0
jne 0x46e01d
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0x3ff00000
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
sub eax, 2
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jmp 0x46e0bd
mov eax, dword [esp + 0x24]
cdq
sub eax, edx
sar eax, 1
cmp dword [esp + 0x2c], eax
jge 0x46e047
fild dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
add ecx, ecx
sub eax, ecx
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jmp 0x46e0a7
jne 0x46e062
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jmp 0x46e0bd
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x2c]
jne 0x46e091
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0x3ff00000
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
sub eax, 2
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jmp 0x46e0bd
fild dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
add eax, eax
sub eax, dword [esp + 0x24]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fdiv st(1)
fstp qword [esp + 0x30]
fild dword [esp + 0x24]
fmul qword [esp + 0x30]
faddp st(1)
fsub qword [0x4b0be0]
fstp qword [esp + 0x18]
test ebx, ebx
je 0x46e0c9
dec dword [esp + 0x20]
test edi, edi
je 0x46e0d1
dec dword [esp + 0x24]
fld qword [esp + 0x30]
fmul qword [0x4b0c20]
call 0x4a8cd0
fld qword [esp + 0x18]
mov dword [esp + 0x38], eax
call 0x4a8cd0
cmp dword [esp + 0x20], 0
mov ebp, eax
jle 0x46e1f3
mov dword [esp + 0x44], 0
mov eax, dword [esp + 0x24]
imul eax, dword [esp + 0x38]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x24]
shl eax, 8
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x54], ecx
mov eax, dword [esp + 0x3c]
and eax, 0xffff
mov dword [esp + 0x3c], eax
cmp dword [esp + 0x24], 0
jle 0x46e1cc
mov ebx, dword [esp + 0x4c]
mov edi, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x40], eax
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x24]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x2c], eax
jg 0x46e170
mov eax, dword [esp + 0x40]
jmp 0x46e180
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x2c]
je 0x46e17e
mov eax, edi
jmp 0x46e180
mov eax, ebx
mov cl, byte [esp + 0x15]
inc esi
inc esi
sub ebx, 0x100
cdq
idiv ebp
mov edx, eax
inc esi
sub edi, dword [esp + 0x38]
imul edx, dword [esp + 0x5c]
sub cl, dh
mov edx, eax
imul edx, dword [esp + 0x60]
imul eax, dword [esp + 0x64]
mov byte [esi - 3], cl
mov cl, byte [esp + 0x16]
sub cl, dh
mov byte [esi - 2], cl
mov cl, byte [esp + 0x17]
sub cl, ah
mov eax, dword [esp + 0x38]
mov byte [esi - 1], cl
add dword [esp + 0x40], eax
dec dword [esp + 0x30]
jne 0x46e160
mov eax, dword [esp + 0x3c]
add dword [esp + 0x50], eax
mov eax, 0x100
mov esi, dword [esp + 0x50]
add dword [esp + 0x44], eax
add dword [esp + 0x48], eax
add dword [esp + 0x4c], eax
dec dword [esp + 0x54]
jne 0x46e12f
mov edx, dword [esp + 0x58]
push edx
call dword [0x4c2590]
xor ax, ax
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x58]
pop ebp
pop edi
mov dword [ecx], edx
pop esi
pop ebx
add esp, 0x58
ret