Function at 0x404fd0
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 0x46d823
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 0x4050d8
mov edx, dword [ebx + 0x1c]
cmp edx, 0x10
jb 0x405071
mov ecx, dword [ebx + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405067
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40526f
push edx
push ecx
call fcn.0046bfdd
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 0x4050b7
mov ecx, dword [ebx + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4050ad
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40526f
push edx
push ecx
call fcn.0046bfdd
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.0046bda2
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00417260
mov esi, eax
test esi, esi
jne 0x40516b
mov edx, dword [ebx + 0x1c]
cmp edx, 0x10
jb 0x40511b
mov ecx, dword [ebx + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405111
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40526f
push edx
push ecx
call fcn.0046bfdd
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 0x405161
mov ecx, dword [ebx + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405157
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40526f
push edx
push ecx
call fcn.0046bfdd
add esp, 8
mov eax, 0xfffffffe
jmp 0x4050ba
cmp dword [ebx + 0x1c], 0x10
lea eax, [ebx + 8]
cmovae eax, dword [ebx + 8]
push eax
push 0x2712
push esi
call fcn.0041b3b0
push 0
push 0x51
push esi
call fcn.0041b3b0
push 0
push 0x40
push esi
call fcn.0041b3b0
push 1
push 0x34
push esi
call fcn.0041b3b0
push 0
push 0x4e2b
push esi
call fcn.0041b3b0
push dword [ebp - 0x18]
push 0x2711
push esi
call fcn.0041b3b0
add esp, 0x48
push 0
push 0x2b
push esi
call fcn.0041b3b0
push 0x404b90
push 0x4e58
push esi
call fcn.0041b3b0
push esi
call fcn.004172c0
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.00417240
test edi, edi
jne 0x405289
mov edx, dword [ebx + 0x1c]
add esp, 4
cmp edx, 0x10
jb 0x405237
mov ecx, dword [ebx + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40522d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40526f
push edx
push ecx
call fcn.0046bfdd
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 0x40527f
mov ecx, dword [ebx + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405275
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405275
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0046bfdd
add esp, 8
mov eax, 1
jmp 0x4050ba
push edi
call fcn.00417dc0
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.00405450
mov edi, eax
cmp byte [edi + 0x10], 0
je 0x40542b
xor ecx, ecx
cmp dword [0x4e2580], 2
jl 0x405402
movaps xmm0, xmmword [str.4444444444444444]
mov eax, 4
movaps xmm4, xmmword [0x47ecf0]
mov esi, 4
movaps xmm3, xmmword [0x47ed90]
mov edx, edi
movaps xmm6, xmmword [0x47ed10]
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 [0x47ed70]
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 [0x47ed70]
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 0x405304
cmp ecx, 0x11
jge 0x40542b
mov eax, 0x51eb851f
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, 0x32
sub dl, al
add dl, 0x34
xor byte [esi], dl
cmp ecx, 0x11
jl 0x405402
sub esp, 0x18
mov edx, edi
mov ecx, esp
push dword [ebp - 0x1c]
call fcn.0040b300
add esp, 4
call fcn.00403fa0
int3