Function at 0x104fb6e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1a0
mov eax, dword [0x10a78b80]
xor eax, esp
mov dword [esp + 0x19c], eax
mov eax, dword [esp + 0x1a4]
mov ecx, dword [esp + 0x1b0]
mov edx, dword [esp + 0x1a8]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1bc]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x1c0]
mov dword [esp + 0x24], eax
imul eax, eax, 0xd
push esi
mov esi, dword [esp + 0x1b8]
push edi
mov edi, dword [esp + 0x1b4]
mov dword [esp + 0x60], edx
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], esi
movzx eax, byte [eax + 0x10a45460]
imul eax, ecx
shr eax, 3
cmp dword [esp + 0x1c0], 0
mov dword [esp + 0x20], eax
jbe 0x104fbc03
movss xmm0, dword [0x108fc6ec]
mov eax, esi
imul eax, dword [esp + 0x50]
movss xmm1, dword [0x105f14d0]
mov dword [esp + 0x1c], eax
mov eax, esi
imul eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
nop word [eax + eax]
mov eax, dword [esp + 0x2c]
sub eax, 4
je 0x104fba43
sub eax, 1
je 0x104fb929
sub eax, 0x49
je 0x104fb912
mov eax, dword [esp + 0x2c]
cmp eax, 0x22
jge 0x104fb8e9
push 0x43
push 1
push 0
push 0
push 0
push esi
push ecx
push 0
call fcn.104fc1f0
push 0x1461
mov esi, eax
lea eax, [esp + 0x34]
push str.F:_vcpkg_2024.05.24_buildtrees_bgfx_src_bgfx_296104bfea.clean_bimg_srcimage.cpp
push eax
call fcn.105096b0
mov edi, dword [esp + 0x60]
add esp, 0x2c
push dword [eax + 4]
mov ecx, dword [edi]
push dword [eax]
push 0
mov edx, dword [ecx + 4]
mov ecx, edi
push esi
push 0
call edx
mov ecx, dword [esp + 0x1b8]
mov edi, eax
push dword [esp + 0x2c]
mov esi, dword [esp + 0x60]
mov dword [esp + 0x58], edi
lea eax, [ecx*4]
push eax
push esi
push ecx
push dword [esp + 0x68]
push edi
push dword [esp + 0x4c]
call fcn.104fbc20
mov edx, dword [esp + 0x1d4]
add esp, 0x1c
test edx, edx
je 0x104fb8b6
test esi, esi
je 0x104fb8b6
mov eax, dword [esp + 0x5c]
mov esi, edi
mov ecx, dword [esp + 0x60]
test eax, eax
je 0x104fb8b4
mov edi, eax
nop
mov eax, esi
test edx, edx
je 0x104fb89c
nop word [eax + eax]
movss xmm1, dword [eax]
add eax, 4
shufps xmm1, xmm1, 0
andps xmm1, xmmword [0x10a47630]
xorps xmm1, xmmword [0x10a47620]
cvtdq2ps xmm0, xmm1
addps xmm0, xmmword [0x10a47600]
mulps xmm0, xmmword [0x10a47580]
movups xmmword [ecx], xmm0
add ecx, 0x10
sub edx, 1
jne 0x104fb860
mov edx, dword [esp + 0x1b8]
lea eax, [edx*4]
add esi, eax
sub edi, 1
jne 0x104fb850
mov edi, dword [esp + 0x54]
mov esi, dword [esp + 0x5c]
jmp 0x104fb8b6
mov esi, eax
push 0x1464
lea eax, [esp + 0xc]
push str.F:_vcpkg_2024.05.24_buildtrees_bgfx_src_bgfx_296104bfea.clean_bimg_srcimage.cpp
push eax
call fcn.105096b0
mov ecx, dword [esp + 0x40]
add esp, 0xc
push dword [eax + 4]
mov edx, dword [ecx]
push dword [eax]
push 0
push 0
push edi
call dword [edx + 4]
mov edx, dword [esp + 0x60]
jmp 0x104fbbca
push dword [esp + 0x50]
push dword [esp + 0x24]
push 1
push esi
push ecx
push eax
push edi
push 0x4e
push edx
push dword [esp + 0x58]
call fcn.104fa120
mov edx, dword [esp + 0x88]
add esp, 0x28
jmp 0x104fbbce
push dword [esp + 0x1c]
push edi
push edx
call fcn.1050a090
mov edx, dword [esp + 0x6c]
add esp, 0xc
jmp 0x104fbbce
mov eax, ecx
mov dword [esp + 0x4c], edi
mov ecx, esi
shr eax, 2
shr ecx, 2
mov dword [esp + 0x30], eax
mov dword [esp + 0x54], ecx
test ecx, ecx
je 0x104fbbce
mov edi, dword [esp + 0x50]
mov ecx, dword [esp + 0x60]
mov esi, ecx
mov eax, dword [esp + 0x50]
mov dword [esp + 0x40], esi
lea edx, [edi*4]
add edi, ecx
mov dword [esp + 0x24], edx
lea ecx, [ecx + eax*2]
mov dword [esp + 0x44], edi
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x38], ecx
cmp dword [esp + 0x30], 0
jbe 0x104fba21
mov esi, dword [esp + 0x50]
mov edi, ecx
add esi, ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x3c], ecx
push eax
lea eax, [esp + 0x68]
push eax
call fcn.104f6980
add dword [esp + 0x54], 0x10
lea eax, [esp + 0x6c]
push 0x40
push eax
push dword [esp + 0x38]
call fcn.1050a090
push 0x40
lea eax, [esp + 0xbc]
push eax
push dword [esp + 0x64]
call fcn.1050a090
push 0x40
lea eax, [esp + 0x108]
push eax
push edi
call fcn.1050a090
push 0x40
lea eax, [esp + 0x154]
push eax
push esi
call fcn.1050a090
add dword [esp + 0x60], 0x40
add esp, 0x38
add dword [esp + 0x48], 0x40
add edi, 0x40
mov eax, dword [esp + 0x4c]
add esi, 0x40
sub dword [esp + 0x3c], 1
jne 0x104fb9a0
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x44]
add ecx, edx
add edi, edx
add esi, edx
mov dword [esp + 0x38], ecx
sub dword [esp + 0x54], 1
mov dword [esp + 0x44], edi
mov dword [esp + 0x40], esi
jne 0x104fb975
jmp 0x104fbbc2
mov edi, esi
mov eax, ecx
mov esi, dword [esp + 0x58]
xor ecx, ecx
shr edi, 2
shr eax, 2
mov dword [esp + 0x44], eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], ecx
test edi, edi
je 0x104fbbc6
mov edx, edi
nop dword [eax]
xor edi, edi
mov dword [esp + 0x54], edi
test eax, eax
je 0x104fbbb5
lea eax, [ecx*4]
mov dword [esp + 0x24], eax
nop dword [eax]
lea eax, [esp + 0x166]
push esi
push eax
call fcn.104f7c00
add esi, 8
lea eax, [esp + 0x16d]
push esi
push eax
call fcn.104f7c00
add esi, 8
lea eax, [edi*4]
mov edi, dword [esp + 0x1c8]
add esp, 0x10
mov dword [esp + 0x48], esi
xor edx, edx
mov esi, dword [esp + 0x24]
mov dword [esp + 0x40], eax
movzx eax, byte [esp + edx*4 + 0x166]
xorps xmm2, xmm2
xorps xmm3, xmm3
cvtsi2ss xmm2, eax
movzx eax, byte [esp + edx*4 + 0x165]
cvtsi2ss xmm3, eax
addss xmm2, xmm2
addss xmm3, xmm3
divss xmm2, xmm0
divss xmm3, xmm0
subss xmm2, xmm1
subss xmm3, xmm1
movaps xmm0, xmm2
mulss xmm0, xmm2
subss xmm1, xmm0
movaps xmm0, xmm3
mulss xmm0, xmm3
subss xmm1, xmm0
xorps xmm0, xmm0
comiss xmm0, xmm1
jbe 0x104fbb35
mov dword [esp + 0x30], closesocket
movss xmm0, dword [esp + 0x30]
jmp 0x104fbb49
movss xmm4, dword [0x10a45320]
comiss xmm4, xmm1
ja 0x104fbb49
shufps xmm1, xmm1, 0
sqrtps xmm0, xmm1
movss xmm1, dword [0x105f14d0]
mov eax, edx
shr eax, 2
mov ecx, edx
add eax, esi
and ecx, 3
imul eax, edi
inc edx
add eax, dword [esp + 0x40]
add ecx, eax
shl ecx, 4
add ecx, dword [esp + 0x60]
movss dword [ecx + 8], xmm0
movss xmm0, dword [0x108fc6ec]
movss dword [ecx], xmm2
movss dword [ecx + 4], xmm3
mov dword [ecx + 0xc], 0
cmp edx, 0x10
jb 0x104fbad1
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x44]
inc edi
mov esi, dword [esp + 0x48]
mov dword [esp + 0x54], edi
cmp edi, eax
jb 0x104fba90
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
inc ecx
mov dword [esp + 0x3c], ecx
cmp ecx, edx
jb 0x104fba70
mov edx, dword [esp + 0x60]
mov esi, dword [esp + 0x5c]
mov edi, dword [esp + 0x58]
add edi, dword [esp + 0x18]
add edx, dword [esp + 0x1c]
sub dword [esp + 0x1c0], 1
movss xmm1, dword [0x105f14d0]
movss xmm0, dword [0x108fc6ec]
mov ecx, dword [esp + 0x1b8]
mov dword [esp + 0x58], edi
mov dword [esp + 0x60], edx
jne 0x104fb790
mov ecx, dword [esp + 0x1a4]
pop edi
pop esi
xor ecx, esp
call fcn.105116c0
add esp, 0x1a0
ret