Function at 0x401590
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x406008]
xor eax, esp
mov dword [esp + 0x50], eax
mov edx, dword [ebp + 0x10]
mov ecx, edx
push ebx
push esi
mov dword [esp + 0x10], 0
push edi
mov dword [esp + 0x44], 0
lea esi, [ecx + 1]
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0xf
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4015d0
sub ecx, esi
push ecx
push edx
lea ecx, [esp + 0x4c]
call fcn.00402120
xorps xmm0, xmm0
mov dword [esp + 0x40], 0
lea edx, [esp + 0x44]
movq qword [esp + 0x38], xmm0
lea ecx, [esp + 0x38]
call fcn.00401220
mov eax, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
sub eax, ebx
sub eax, 0x30
cmp eax, 0x18
jae 0x401846
cmp byte [0x404243], 0
mov eax, dword [str.n_ph8]
mov ecx, dword [0x404240]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
je 0x40176b
xor ebx, ebx
cmp dword [0x4065ac], 2
jl 0x401742
movaps xmm2, xmmword [0x4042b0]
mov edx, 1
movaps xmm3, xmmword [0x4042f0]
movaps xmm1, xmm2
punpckldq xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
movd xmm4, edx
mov edx, 0x1f
psrad xmm1, xmm4
movaps xmm0, xmm1
movd xmm5, edx
psrld xmm0, xmm5
paddd xmm0, xmm1
pmulld xmm0, xmmword [0x4042d0]
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
movaps xmm2, xmmword [0x4042c0]
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x4042e0]
packuswb xmm1, xmm1
paddb xmm1, xmmword [0x404300]
movd xmm0, eax
pxor xmm1, xmm0
movaps xmm0, xmm2
movd dword [esp + 0x14], xmm1
movaps xmm1, xmm2
punpckldq xmm1, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm4
movaps xmm0, xmm1
psrld xmm0, xmm5
paddd xmm0, xmm1
pmulld xmm0, xmmword [0x4042d0]
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x4042e0]
packuswb xmm1, xmm1
paddb xmm1, xmmword [0x404300]
movd xmm0, ecx
pxor xmm1, xmm0
movd dword [esp + 0x18], xmm1
jmp 0x40176b
mov eax, 0x29e4129f
mov cl, bl
mul ebx
mov eax, ebx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 5
movsx eax, al
imul eax, eax, 0x37
sub cl, al
add cl, 0x31
xor byte [esp + ebx + 0x14], cl
inc ebx
cmp ebx, 8
jl 0x401742
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], 0
mov dword [esp + 0x30], 0
lea edx, [ecx + 1]
mov dword [esp + 0x34], 0xf
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401790
sub ecx, edx
lea eax, [esp + 0x14]
push ecx
push eax
lea ecx, [esp + 0x28]
call fcn.00402120
cmp dword [esp + 0x34], 0x10
lea ecx, [esp + 0x20]
cmovae ecx, dword [esp + 0x20]
mov edi, ecx
lea edx, [edi + 1]
nop dword [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x4017c0
mov ebx, dword [esp + 0x38]
sub edi, edx
mov edx, ebx
cmp dword [ebx + 0x14], 0x10
mov esi, dword [ebx + 0x10]
jb 0x4017da
mov edx, dword [ebx]
cmp esi, edi
jne 0x40183f
sub esi, 4
jb 0x4017f4
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x4017f9
add edx, 4
add ecx, 4
sub esi, 4
jae 0x4017e3
cmp esi, 0xfffffffc
je 0x40182d
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x401826
cmp esi, 0xfffffffd
je 0x40182d
mov al, byte [edx + 1]
cmp al, byte [ecx + 1]
jne 0x401826
cmp esi, 0xfffffffe
je 0x40182d
mov al, byte [edx + 2]
cmp al, byte [ecx + 2]
jne 0x401826
cmp esi, 0xffffffff
je 0x40182d
mov al, byte [edx + 3]
cmp al, byte [ecx + 3]
je 0x40182d
sbb eax, eax
or eax, 1
jmp 0x40182f
xor eax, eax
test eax, eax
jne 0x40183f
mov byte [esp + 0x13], 1
mov eax, 1
jmp 0x40184f
mov eax, 1
jmp 0x40184a
mov eax, dword [esp + 0x14]
mov byte [esp + 0x13], 0
test al, 1
je 0x40188f
mov eax, dword [esp + 0x34]
cmp eax, 0x10
jb 0x40188f
mov ecx, dword [esp + 0x20]
lea edx, [eax + 1]
mov eax, ecx
cmp edx, 0x1000
jb 0x401881
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4019bc
push edx
push ecx
call fcn.00402e65
mov ebx, dword [esp + 0x40]
add esp, 8
cmp byte [esp + 0x13], 0
je 0x401986
cmp dword [ebx + 0x28], 0
lea esi, [ebx + 0x18]
je 0x401986
mov ax, word [0x4042a0]
movq xmm0, qword [str.r_GFpJ:]
movq qword [esp + 0x14], xmm0
mov word [esp + 0x1c], ax
test ah, ah
je 0x4018ef
xor ebx, ebx
mov eax, 0x29e4129f
mov cl, bl
mul ebx
mov eax, ebx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 5
movsx eax, al
imul eax, eax, 0x37
sub cl, al
add cl, 0x31
xor byte [esp + ebx + 0x14], cl
inc ebx
cmp ebx, 0xa
jl 0x4018c6
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], 0
mov dword [esp + 0x30], 0
lea edx, [ecx + 1]
mov dword [esp + 0x34], 0xf
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401910
sub ecx, edx
lea eax, [esp + 0x14]
push ecx
push eax
lea ecx, [esp + 0x28]
call fcn.00402120
cmp dword [esp + 0x34], 0x10
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
cmp dword [esi + 0x14], 0x10
jb 0x40193e
mov esi, dword [esi]
push 0x30
push eax
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [esp + 0x34]
cmp edx, 0x10
jb 0x401982
mov ecx, dword [esp + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401978
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401978
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00402e65
add esp, 8
xor esi, esi
jmp 0x40198b
mov esi, 1
lea ecx, [esp + 0x38]
call fcn.00401fc0
mov edx, dword [esp + 0x58]
cmp edx, 0x10
jb 0x4019cc
mov ecx, dword [esp + 0x44]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4019c2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4019c2
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00402e65
add esp, 8
mov ecx, dword [esp + 0x5c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00402e27
mov esp, ebp
pop ebp
ret 0x10