Function at 0x405000
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46d973
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x58
mov eax, dword [0x4833a8]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 1
lea eax, [ebx + 0x20]
cmp dword [ebx + 0x34], 0x10
push 0x47d354
cmovae eax, dword [ebx + 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
add esp, 0xc
cmp dword [ebp - 0x18], 0
jne 0x405108
mov edx, dword [ebx + 0x1c]
cmp edx, 0x10
jb 0x4050a1
mov ecx, dword [ebx + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405097
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40529f
push edx
push ecx
call fcn.0046c11f
add esp, 8
mov edx, dword [ebx + 0x34]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0xf
mov byte [ebx + 8], 0
cmp edx, 0x10
jb 0x4050e7
mov ecx, dword [ebx + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4050dd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40529f
push edx
push ecx
call fcn.0046c11f
add esp, 8
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0046bee2
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00417380
mov esi, eax
test esi, esi
jne 0x40519b
mov edx, dword [ebx + 0x1c]
cmp edx, 0x10
jb 0x40514b
mov ecx, dword [ebx + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405141
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40529f
push edx
push ecx
call fcn.0046c11f
add esp, 8
mov edx, dword [ebx + 0x34]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0xf
mov byte [ebx + 8], 0
cmp edx, 0x10
jb 0x405191
mov ecx, dword [ebx + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405187
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40529f
push edx
push ecx
call fcn.0046c11f
add esp, 8
mov eax, 0xfffffffe
jmp 0x4050ea
cmp dword [ebx + 0x1c], 0x10
lea eax, [ebx + 8]
cmovae eax, dword [ebx + 8]
push eax
push 0x2712
push esi
call fcn.0041b4e0
push 0
push 0x51
push esi
call fcn.0041b4e0
push 0
push 0x40
push esi
call fcn.0041b4e0
push 1
push 0x34
push esi
call fcn.0041b4e0
push 0
push 0x4e2b
push esi
call fcn.0041b4e0
push dword [ebp - 0x18]
push 0x2711
push esi
call fcn.0041b4e0
add esp, 0x48
push 0
push 0x2b
push esi
call fcn.0041b4e0
push 0x404ba0
push 0x4e58
push esi
call fcn.0041b4e0
push esi
call fcn.004173e0
push 0x47d358
mov edi, eax
call fcn.00402020
push dword [ebp - 0x18]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x24
push esi
call fcn.00417360
test edi, edi
jne 0x4052b9
mov edx, dword [ebx + 0x1c]
add esp, 4
cmp edx, 0x10
jb 0x405267
mov ecx, dword [ebx + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40525d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40529f
push edx
push ecx
call fcn.0046c11f
add esp, 8
mov edx, dword [ebx + 0x34]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0xf
mov byte [ebx + 8], 0
cmp edx, 0x10
jb 0x4052af
mov ecx, dword [ebx + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4052a5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4052a5
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0046c11f
add esp, 8
mov eax, 1
jmp 0x4050ea
push edi
call fcn.00417ef0
add esp, 8
lea ecx, [ebp - 0x5c]
push eax
call fcn.00401ba0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 2
push eax
call fcn.00405490
mov edi, eax
cmp byte [edi + 0x10], 0
je 0x40546b
xor ecx, ecx
cmp dword [0x4e2580], 2
jl 0x405440
movaps xmm0, xmmword [str.7777777777777777]
mov eax, 5
movaps xmm4, xmmword [0x47ece0]
mov esi, 4
movaps xmm3, xmmword [0x47ed90]
mov edx, edi
movaps xmm6, xmmword [0x47ed00]
sub esi, edi
movd xmm5, eax
mov eax, 0x1f
movaps xmmword [ebp - 0x30], xmm0
movd xmm7, eax
mov eax, dword [ebp - 0x30]
movd xmm0, ecx
add ecx, 8
pshufd xmm2, xmm0, 0
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm2
psrad xmm1, xmm5
movaps xmm0, xmm1
psrld xmm0, xmm7
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x47ed60]
packuswb xmm1, xmm1
movd xmm0, eax
lea eax, [esi + edx]
lea edx, [edx + 8]
paddb xmm1, xmm0
movd xmm0, dword [edx - 8]
pxor xmm1, xmm0
movd xmm0, eax
pshufd xmm2, xmm0, 0
movd dword [edx - 8], xmm1
paddd xmm2, xmm4
mov eax, dword [ebp - 0x30]
movaps xmm1, xmm2
punpckldq xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm2
psrad xmm1, xmm5
movaps xmm0, xmm1
psrld xmm0, xmm7
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x47ed60]
packuswb xmm1, xmm1
movd xmm0, eax
paddb xmm1, xmm0
movd xmm0, dword [edx - 4]
pxor xmm1, xmm0
movd dword [edx - 4], xmm1
cmp ecx, 0x10
jl 0x405334
cmp ecx, 0x11
jge 0x40546b
nop word [eax + eax]
mov eax, 0x8fb823ef
lea esi, [ecx + edi]
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dl, cl
movsx eax, al
inc ecx
imul eax, eax, 0x39
sub dl, al
add dl, 0x37
xor byte [esi], dl
cmp ecx, 0x11
jl 0x405440
sub esp, 0x18
mov edx, edi
mov ecx, esp
push dword [ebp - 0x1c]
call fcn.0040b420
add esp, 4
call fcn.00403fa0
int3