Function at 0x4052e0
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 0x46dbf3
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x58
mov eax, dword [0x4843a8]
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 0x47d364
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 0x4053e8
mov edx, dword [ebx + 0x1c]
cmp edx, 0x10
jb 0x405381
mov ecx, dword [ebx + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405377
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40557f
push edx
push ecx
call fcn.0046c3ad
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 0x4053c7
mov ecx, dword [ebx + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4053bd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40557f
push edx
push ecx
call fcn.0046c3ad
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.0046c172
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004175d0
mov esi, eax
test esi, esi
jne 0x40547b
mov edx, dword [ebx + 0x1c]
cmp edx, 0x10
jb 0x40542b
mov ecx, dword [ebx + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405421
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40557f
push edx
push ecx
call fcn.0046c3ad
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 0x405471
mov ecx, dword [ebx + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405467
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40557f
push edx
push ecx
call fcn.0046c3ad
add esp, 8
mov eax, 0xfffffffe
jmp 0x4053ca
cmp dword [ebx + 0x1c], 0x10
lea eax, [ebx + 8]
cmovae eax, dword [ebx + 8]
push eax
push 0x2712
push esi
call fcn.0041b720
push 0
push 0x51
push esi
call fcn.0041b720
push 0
push 0x40
push esi
call fcn.0041b720
push 1
push 0x34
push esi
call fcn.0041b720
push 0
push 0x4e2b
push esi
call fcn.0041b720
push dword [ebp - 0x18]
push 0x2711
push esi
call fcn.0041b720
add esp, 0x48
push 0
push 0x2b
push esi
call fcn.0041b720
push 0x404ea0
push 0x4e58
push esi
call fcn.0041b720
push esi
call fcn.00417630
push 0x47d368
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.004175b0
test edi, edi
jne 0x405599
mov edx, dword [ebx + 0x1c]
add esp, 4
cmp edx, 0x10
jb 0x405547
mov ecx, dword [ebx + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40553d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40557f
push edx
push ecx
call fcn.0046c3ad
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 0x40558f
mov ecx, dword [ebx + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405585
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405585
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0046c3ad
add esp, 8
mov eax, 1
jmp 0x4053ca
push edi
call fcn.00418130
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.00405760
mov edi, eax
cmp byte [edi + 0x10], 0
je 0x40573b
xor ecx, ecx
cmp dword [0x4e3580], 2
jl 0x405712
movaps xmm0, xmmword [str.3333333333333333]
mov eax, 4
movaps xmm4, xmmword [0x47ed90]
mov esi, 4
movaps xmm3, xmmword [0x47ee30]
mov edx, edi
movaps xmm6, xmmword [0x47edb0]
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
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 [0x47ee10]
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
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 [0x47ee10]
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 0x405614
cmp ecx, 0x11
jge 0x40573b
mov eax, 0x5397829d
lea esi, [ecx + edi]
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dl, cl
movsx eax, al
inc ecx
imul eax, eax, 0x31
sub dl, al
add dl, 0x33
xor byte [esi], dl
cmp ecx, 0x11
jl 0x405712
sub esp, 0x18
mov edx, edi
mov ecx, esp
push dword [ebp - 0x1c]
call fcn.0040b620
add esp, 4
call fcn.00403fa0
int3