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

Disassembly:
sub esp, 0x78
push ebx
mov ebx, dword [esp + 0x80]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x38]
mov dword [esp + 0x40], ecx
mov ecx, dword [ecx + 4]
mov edx, dword [ecx + 0xc]
mov cl, byte [eax + 0x24]
push ebp
test cl, cl
push esi
mov esi, dword [ebx + 0x28]
setne byte [esp + 0xf]
push edi
mov edi, dword [ebx + 4]
mov ecx, edi
sar ecx, 0x1f
mov eax, ecx
mov dword [esp + 0x58], edx
xor eax, edi
sub eax, ecx
mov edx, esi
sar edx, 0x1f
mov ecx, edx
xor ecx, esi
sub ecx, edx
cmp ecx, eax
mov dword [esp + 0x3c], ecx
jg 0x46d6c3
mov dword [esp + 0x3c], eax
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0x2c]
mov ebp, eax
sar ebp, 0x1f
mov edx, ebp
xor edx, eax
mov dword [esp + 0x5c], eax
sub edx, ebp
mov eax, ecx
sar eax, 0x1f
mov ebp, eax
xor ebp, ecx
sub ebp, eax
cmp ebp, edx
jle 0x46d6e9
mov edx, ebp
cmp edx, 0x10000
jg 0x46d6ff
cmp dword [esp + 0x3c], 0x10000
jle 0x46dc6b
mov edx, dword [ebx + 4]
mov ebp, edx
sar ebp, 0x1f
mov dword [esp + 0x7c], edx
mov dword [esp + 0x60], ebp
xor ebp, edx
mov edx, dword [esp + 0x60]
mov eax, esi
sar eax, 0x1f
sub ebp, edx
mov edx, eax
xor edx, esi
sub edx, eax
cmp ebp, edx
jg 0x46d737
mov eax, esi
sar eax, 0x1f
mov edx, eax
xor edx, esi
sub edx, eax
mov dword [esp + 0x2c], edx
jmp 0x46d748
mov edx, edi
sar edx, 0x1f
mov eax, edx
xor eax, edi
sub eax, edx
mov dword [esp + 0x2c], eax
mov edx, eax
mov edi, dword [esp + 0x5c]
mov esi, ecx
sar esi, 0x1f
mov ebp, esi
mov eax, edi
sar eax, 0x1f
xor ebp, ecx
sub ebp, esi
mov esi, eax
xor esi, edi
sub esi, eax
cmp ebp, esi
jg 0x46d773
mov ecx, edi
sar ecx, 0x1f
mov eax, ecx
xor eax, edi
sub eax, ecx
jmp 0x46d77e
mov esi, ecx
sar esi, 0x1f
mov eax, esi
xor eax, ecx
sub eax, esi
mov ecx, dword [ebx + 0x10]
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x50], ecx
movzx ecx, word [eax]
mov eax, dword [esp + 0x94]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x64], ecx
je 0x46dc6b
mov dword [esp + 0x60], eax
jmp 0x46d7c0
mov edx, dword [esp + 0x2c]
xor ebx, ebx
jmp 0x46d7c0
mov esi, dword [esp + 0x90]
mov eax, dword [esi]
mov ecx, eax
sar ecx, 0x10
mov dword [esp + 0x3c], ecx
lea ecx, [eax + edx]
or edx, 0xffffffff
sar eax, 8
sub edx, eax
mov eax, dword [esi + 4]
and edx, 0xff
mov dword [esp + 0x6c], edx
movzx edx, ch
mov ebp, ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x70], edx
add ecx, eax
or edx, 0xffffffff
mov edi, eax
sar eax, 8
sub edx, eax
and edx, 0xff
sar edi, 0x10
mov esi, ecx
mov dword [esp + 0x74], edx
sar esi, 0x10
movzx edx, ch
sar ebp, 0x10
cmp edi, esi
mov dword [esp + 0x38], ebp
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x78], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x14], edi
jg 0x46db2f
jmp 0x46d850
mov ecx, dword [esp + 0x3c]
cmp ecx, ebp
mov dword [esp + 0x1c], ecx
jg 0x46da69
mov eax, dword [esp + 0x8c]
mov esi, dword [esp + 0x64]
mov edx, dword [eax + 0x18]
mov eax, dword [eax + 0x1c]
and esi, 1
mov dword [esp + 0x68], esi
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
jmp 0x46d890
mov esi, dword [esp + 0x68]
mov ecx, dword [esp + 0x1c]
lea ebx, [ebx]
mov eax, dword [esp + 0x14]
xor edx, edx
xor bp, bp
test esi, esi
mov dword [esp + 0x82], edx
je 0x46d8cc
test ecx, ecx
jge 0x46d8aa
xor ecx, ecx
mov esi, dword [esp + 0x14]
test esi, esi
jge 0x46d8b4
xor eax, eax
mov esi, dword [esp + 0x30]
cmp ecx, esi
jl 0x46d8bf
lea ecx, [esi - 1]
mov esi, dword [esp + 0x34]
cmp eax, esi
jl 0x46d906
lea eax, [esi - 1]
jmp 0x46d906
test ecx, ecx
mov esi, dword [esp + 0x30]
jge 0x46d8d8
add ecx, esi
js 0x46d8d4
cmp ecx, esi
jl 0x46d8e6
lea esp, [esp]
sub ecx, esi
cmp ecx, esi
jge 0x46d8e0
mov esi, dword [esp + 0x14]
test esi, esi
mov esi, dword [esp + 0x34]
jge 0x46d8f6
add eax, esi
js 0x46d8f2
cmp eax, esi
jl 0x46d906
lea ebx, [ebx]
sub eax, esi
cmp eax, esi
jge 0x46d900
imul eax, dword [esp + 0x50]
add eax, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
sub esi, 3
je 0x46d973
dec esi
je 0x46d93e
dec esi
jne 0x46d99c
mov ecx, dword [eax + ecx*4]
mov eax, ecx
shr eax, 0x10
movzx di, al
mov edx, ecx
mov eax, ecx
shr edx, 0x18
shr eax, 8
movzx si, al
movzx bp, cl
jmp 0x46d9ac
movzx eax, word [eax + ecx*2]
mov ecx, eax
shr ecx, 0xa
and ecx, 0x1f
mov di, word [ecx*4 + 0x5fa940]
mov ecx, eax
shr ecx, 5
and ecx, 0x1f
mov si, word [ecx*4 + 0x5fa940]
and eax, 0x1f
mov bp, word [eax*4 + 0x5fa940]
mov dx, 0xff
jmp 0x46d9bd
movzx edx, byte [eax + ecx]
mov eax, dword [esp + 0x8c]
mov ecx, dword [eax + 0x14]
movzx di, byte [ecx + edx*4 + 2]
movzx si, byte [ecx + edx*4 + 1]
movzx bp, byte [ecx + edx*4]
lea eax, [ecx + edx*4]
movzx dx, byte [eax + 3]
jmp 0x46d9ac
mov si, word [esp + 0x82]
mov di, word [esp + 0x84]
test dx, dx
jne 0x46d9bd
mov al, byte [esp + 0x13]
test al, al
je 0x46da4a
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x3c]
jne 0x46d9cd
mov eax, dword [esp + 0x6c]
jmp 0x46d9dc
cmp eax, dword [esp + 0x38]
mov eax, dword [esp + 0x70]
je 0x46d9dc
mov eax, 0x100
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esp + 0x48]
jne 0x46d9ed
imul eax, dword [esp + 0x74]
jmp 0x46d9fd
cmp ecx, dword [esp + 0x4c]
jne 0x46d9fa
imul eax, dword [esp + 0x78]
jmp 0x46d9fd
shl eax, 8
movzx ecx, di
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
sar eax, 8
imul ecx, eax
add edi, ecx
movzx ecx, si
mov esi, dword [esp + 0x18]
imul ecx, eax
add ebx, ecx
movzx ecx, bp
movzx edx, dx
imul ecx, eax
imul edx, eax
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x28]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x44]
add edi, ecx
add esi, edx
add ebx, eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x44], ebx
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jle 0x46d882
mov edi, dword [esp + 0x48]
mov esi, dword [esp + 0x4c]
mov ebp, ecx
mov eax, dword [esp + 0x14]
inc eax
cmp eax, esi
mov dword [esp + 0x14], eax
jle 0x46d850
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46db0a
mov ecx, dword [esp + 0x98]
xor edx, edx
cmp ebx, 0x10000
jae 0x46dad8
mov eax, 0x1000000
div ebx
mov edx, eax
imul edx, dword [esp + 0x20]
shr edx, 0x18
mov word [ecx + 4], dx
mov edx, eax
imul edx, dword [esp + 0x24]
shr edx, 0x18
mov word [ecx + 2], dx
mov edx, eax
imul eax, dword [esp + 0x18]
imul edx, dword [esp + 0x28]
shr edx, 0x18
shr eax, 0x18
mov word [ecx], dx
mov word [ecx + 6], ax
jmp 0x46dc2e
mov eax, dword [esp + 0x20]
div ebx
xor edx, edx
mov word [ecx + 4], ax
mov eax, dword [esp + 0x24]
div ebx
xor edx, edx
mov word [ecx + 2], ax
mov eax, dword [esp + 0x28]
div ebx
xor edx, edx
mov word [ecx], ax
mov eax, dword [esp + 0x18]
div ebx
mov word [ecx + 6], ax
jmp 0x46dc2e
test ebx, ebx
je 0x46db2f
mov al, byte [esp + 0x13]
test al, al
je 0x46db2f
mov eax, dword [esp + 0x98]
mov dword [eax], 0
mov dword [eax + 4], 0
jmp 0x46dc2e
mov ecx, dword [esp + 0x3c]
test ecx, ecx
mov esi, dword [esp + 0x8c]
mov eax, edi
jge 0x46db44
xor ecx, ecx
jmp 0x46db4e
mov edx, dword [esi + 0x18]
cmp ecx, edx
jl 0x46db4e
lea ecx, [edx - 1]
test eax, eax
jge 0x46db56
xor eax, eax
jmp 0x46db60
mov edx, dword [esi + 0x1c]
cmp eax, edx
jl 0x46db60
lea eax, [edx - 1]
imul eax, dword [esp + 0x50]
mov ebx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
add eax, ebx
sub edx, 3
je 0x46dbfb
dec edx
je 0x46dbb5
dec edx
jne 0x46dc2e
mov eax, dword [eax + ecx*4]
mov ecx, dword [esp + 0x98]
mov edx, eax
shr edx, 0x18
mov word [ecx + 6], dx
mov edx, eax
shr edx, 0x10
movzx dx, dl
mov word [ecx + 4], dx
mov edx, eax
shr edx, 8
movzx dx, dl
mov word [ecx + 2], dx
movzx ax, al
jmp 0x46dc2b
movzx eax, word [eax + ecx*2]
mov ecx, dword [esp + 0x98]
mov edx, eax
shr edx, 0xa
and edx, 0x1f
mov word [ecx + 6], 0xff
mov dx, word [edx*4 + 0x5fa940]
mov word [ecx + 4], dx
mov edx, eax
shr edx, 5
and edx, 0x1f
mov dx, word [edx*4 + 0x5fa940]
and eax, 0x1f
mov word [ecx + 2], dx
mov ax, word [eax*4 + 0x5fa940]
jmp 0x46dc2b
movzx ecx, byte [eax + ecx]
mov edx, dword [esi + 0x14]
lea eax, [edx + ecx*4]
movzx dx, byte [eax + 3]
mov ecx, dword [esp + 0x98]
mov word [ecx + 6], dx
movzx dx, byte [eax + 2]
mov word [ecx + 4], dx
movzx dx, byte [eax + 1]
mov word [ecx + 2], dx
movzx ax, byte [eax]
mov word [ecx], ax
mov eax, dword [esp + 0x90]
mov edx, dword [eax]
mov ecx, dword [esp + 0x7c]
mov esi, dword [esp + 0x98]
add edx, ecx
mov ecx, dword [eax + 4]
mov dword [eax], edx
mov edx, dword [esp + 0x5c]
add ecx, edx
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x60]
add esi, 8
dec eax
mov dword [esp + 0x98], esi
mov dword [esp + 0x60], eax
jne 0x46d7b2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret