Function at 0x401590
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x29c
mov eax, dword [0x40d154]
xor eax, esp
mov dword [esp + 0x298], eax
push ebx
push ebp
mov ebp, dword [esp + 0x2a8]
push esi
push edi
mov edi, ecx
mov ecx, dword [edi]
mov eax, dword [edi + 4]
xor ebx, ebx
mov esi, edx
mov dword [esp + 0x24], ebx
cmp ecx, 0x258
ja 0x401aba
je 0x401a15
cmp ecx, 0x12c
ja 0x4018d7
je 0x4018a6
sub ecx, 0x64
je 0x401772
sub ecx, 0x64
jne 0x401b9c
mov ebx, dword [edi + 8]
mov ecx, eax
and ecx, 0xff
xor ebx, ecx
xor dword [edi + 0x10], ecx
mov dword [esp + 0x20], ebx
lea edx, [edi + 0x14]
mov ecx, 0
jbe 0x401628
xor dword [edx + ecx*4], eax
mov ebx, eax
shr ebx, 0x1f
add eax, eax
inc ecx
xor eax, ebx
cmp ecx, dword [edi + 0x10]
jb 0x401612
mov ebx, dword [esp + 0x20]
lea ecx, [esp + 0x2c]
push ecx
push edx
push ebx
call fcn.0040203c
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x14], eax
call fcn.004026df
mov ecx, dword [esp + 0x1c]
mov ebx, dword [ecx]
test eax, eax
je 0x401656
mov dword [esp + 0x10], 0xbb7
xor ebx, ebx
lea edx, [esp + 0x18]
push edx
call fcn.00402c17
cmp eax, 0x61
je 0x401713
mov eax, dword [esp + 0x18]
cmp eax, dword [0x40e7ec]
je 0x401713
mov edx, dword [edi + 0xc]
lea ecx, [esp + 0x34]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_WSADuplicateSocketW]
test eax, eax
jne 0x401713
mov eax, dword [esp + 0x18]
mov ecx, dword [0x40e944]
mov dword [0x40e7ec], eax
lea eax, [ebx + 0x290]
push eax
push 8
push ecx
mov dword [ebp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], 0
mov edx, dword [esi]
mov eax, dword [esp + 0x10]
mov dword [edx + 4], eax
mov ecx, dword [esi]
mov dword [ecx + 8], 0x6e
mov edx, dword [esi]
mov dword [edx + 0x10], ebx
mov eax, dword [esi]
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0x14], ecx
test ebx, ebx
jbe 0x4016f3
mov edx, dword [esp + 0x1c]
mov eax, dword [esi]
push ebx
push edx
add eax, 0x18
push eax
call fcn.004069e0
add esp, 0xc
mov ecx, dword [esi]
mov edx, dword [esp + 0x18]
mov dword [ecx + ebx + 0x18], edx
mov eax, dword [esi]
lea edi, [eax + ebx + 0x1c]
mov ecx, 0x9d
lea esi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
jmp 0x401bf7
mov ecx, dword [0x40e944]
lea eax, [ebx + 0x18]
push eax
push 8
push ecx
mov dword [ebp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], 0
mov edx, dword [esi]
mov eax, dword [esp + 0x10]
mov dword [edx + 4], eax
mov ecx, dword [esi]
mov dword [ecx + 8], 0xb
mov edx, dword [esi]
mov dword [edx + 0x10], ebx
mov eax, dword [esi]
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0x14], ecx
test ebx, ebx
jbe 0x401bf7
mov edx, dword [esp + 0x1c]
mov eax, dword [esi]
push ebx
push edx
add eax, 0x18
push eax
call fcn.004069e0
add esp, 0xc
jmp 0x401bf7
movzx eax, al
xor eax, dword [edi + 8]
push eax
call fcn.00401c14
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x14], eax
call fcn.004026df
mov edx, dword [esp + 0x1c]
mov ebx, dword [edx]
test eax, eax
je 0x4017a0
mov dword [esp + 0x10], 0xbb7
xor ebx, ebx
lea eax, [esp + 0x18]
push eax
call fcn.00402c17
cmp eax, 0x61
je 0x401850
mov eax, dword [esp + 0x18]
cmp eax, dword [0x40e7ec]
je 0x401850
mov edx, dword [edi + 0xc]
lea ecx, [esp + 0x34]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_WSADuplicateSocketW]
test eax, eax
jne 0x401850
mov eax, dword [esp + 0x18]
mov edx, dword [0x40e944]
mov dword [0x40e7ec], eax
lea eax, [ebx + 0x28c]
push eax
push 8
push edx
mov dword [ebp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [esp + 0x10]
mov dword [esi], eax
mov dword [eax], 0
mov eax, dword [esi]
mov dword [eax + 4], ecx
mov edx, dword [esi]
mov dword [edx + 8], 0x64
mov eax, dword [esi]
mov dword [eax + 0x10], ebx
test ebx, ebx
jbe 0x401830
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi]
push ebx
push ecx
add edx, 0x14
push edx
call fcn.004069e0
add esp, 0xc
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov dword [eax + ebx + 0x14], ecx
mov edx, dword [esi]
lea edi, [edx + ebx + 0x18]
mov ecx, 0x9d
lea esi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
jmp 0x401bf7
mov ecx, dword [0x40e944]
lea eax, [ebx + 0x14]
push eax
push 8
push ecx
mov dword [ebp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], 0
mov edx, dword [esi]
mov eax, dword [esp + 0x10]
mov dword [edx + 4], eax
mov ecx, dword [esi]
mov dword [ecx + 8], 0xa
mov edx, dword [esi]
mov dword [edx + 0x10], ebx
test ebx, ebx
jbe 0x401bf7
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi]
push ebx
push eax
add ecx, 0x14
push ecx
call fcn.004069e0
add esp, 0xc
jmp 0x401bf7
call fcn.00402c0d
push 0x10
mov edi, eax
mov eax, dword [0x40e944]
push 8
push eax
mov dword [ebp], 0x10
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], ebx
mov ecx, dword [esi]
mov dword [ecx + 4], edi
mov edx, dword [esi]
mov dword [edx + 8], ebx
jmp 0x401bf7
cmp ecx, 0x1f4
jne 0x401b9c
mov ebx, dword [edi + 0x10]
mov ecx, eax
and ecx, 0xff
shr eax, 8
and eax, 0xff
mov edx, ecx
shl edx, 8
add eax, edx
xor eax, dword [edi + 0xc]
mov edi, dword [edi + 8]
xor ebx, ecx
mov dword [esp + 0x10], eax
mov eax, ebx
xor edi, ecx
and eax, 1
mov dword [esp + 0x28], eax
je 0x40191e
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
mov ecx, dword [0x40e944]
push eax
push 8
push ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x401941
push 1
call fcn.00403237
mov ecx, dword [esp + 0x10]
push ebx
lea edx, [esp + 0x18]
push edx
push ecx
push edi
push eax
call fcn.00402488
cmp dword [esp + 0x28], 0
mov edi, eax
je 0x401995
mov edx, dword [0x40e944]
push 0x14
push 8
push edx
mov dword [ebp], 0x14
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], 0
mov eax, dword [esi]
mov dword [eax + 4], edi
mov ecx, dword [esi]
mov dword [ecx + 8], 0x1e
mov edx, dword [esi]
mov eax, dword [esp + 0x14]
mov dword [edx + 0x10], eax
jmp 0x4019fc
test edi, edi
je 0x4019a1
xor ecx, ecx
mov dword [esp + 0x14], ecx
jmp 0x4019a5
mov ecx, dword [esp + 0x14]
lea eax, [ecx + 0x14]
mov dword [ebp], eax
test ecx, ecx
je 0x4019c1
mov ecx, dword [0x40e944]
push eax
push 8
push ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov edx, dword [esi]
mov dword [edx], 0
mov eax, dword [esi]
mov dword [eax + 4], edi
mov ecx, dword [esi]
mov dword [ecx + 8], 0x14
mov eax, dword [esp + 0x14]
mov edx, dword [esi]
mov dword [edx + 0x10], eax
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x4019fc
mov ecx, dword [esp + 0x20]
mov edx, dword [esi]
push eax
push ecx
add edx, 0x14
push edx
call fcn.004069e0
add esp, 0xc
mov eax, dword [esp + 0x20]
mov ecx, dword [0x40e944]
push eax
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x401bf7
lea edx, [edi + 0x14]
mov dword [esp + 0x14], edx
mov edx, eax
and edx, 0xff
mov ecx, eax
shr ecx, 8
mov ebx, edx
shl ebx, 8
and ecx, 0xff
add ecx, ebx
xor ecx, dword [edi + 0xc]
mov ebx, dword [edi + 8]
mov edi, dword [edi + 0x10]
xor edi, edx
xor ebx, edx
xor edx, edx
mov dword [esp + 0x28], edi
test ecx, ecx
jbe 0x401a6a
lea ecx, [ecx]
mov edi, dword [esp + 0x14]
xor byte [edi + edx], al
mov edi, eax
shr edi, 0x18
shl eax, 8
inc edx
xor eax, edi
cmp edx, ecx
jb 0x401a50
mov edi, dword [esp + 0x28]
push edi
lea eax, [esp + 0x34]
push eax
push ecx
mov ecx, dword [esp + 0x20]
push ebx
push ecx
call fcn.004024ff
mov edx, dword [0x40e944]
push 0x14
push 8
push edx
mov edi, eax
mov dword [ebp], 0x14
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], 0
mov eax, dword [esi]
mov dword [eax + 4], edi
mov ecx, dword [esi]
mov dword [ecx + 8], 0x1e
mov edx, dword [esi]
mov eax, dword [esp + 0x30]
mov dword [edx + 0x10], eax
jmp 0x401bf7
cmp ecx, 0x3e8
ja 0x401b94
je 0x401b5e
sub ecx, 0x320
je 0x401b1a
sub ecx, 0x64
jne 0x401b9c
movzx eax, al
xor eax, dword [edi + 8]
push eax
mov dword [esp + 0x28], eax
call fcn.00402c2f
mov ecx, dword [0x40e944]
push 0x10
push 8
push ecx
mov edi, eax
mov dword [ebp], 0x10
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], ebx
mov edx, dword [esi]
mov dword [edx + 4], edi
mov eax, dword [esi]
mov dword [eax + 8], ebx
jmp 0x401bf7
lea ecx, [esp + 0x24]
push ecx
call fcn.00402c17
mov edx, dword [0x40e944]
push 0x14
push 8
push edx
mov edi, eax
mov dword [ebp], 0x14
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], ebx
mov eax, dword [esi]
mov dword [eax + 4], edi
mov ecx, dword [esi]
mov dword [ecx + 8], 0x1e
mov edx, dword [esi]
mov eax, dword [esp + 0x24]
mov dword [edx + 0x10], eax
jmp 0x401bf7
movzx eax, al
xor eax, dword [edi + 8]
push eax
call fcn.004025af
mov ecx, dword [0x40e944]
push 0x10
push 8
push ecx
mov edi, eax
mov dword [ebp], 0x10
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], ebx
mov edx, dword [esi]
mov dword [edx + 4], edi
mov eax, dword [esi]
mov dword [eax + 8], ebx
jmp 0x401bf7
cmp ecx, 0x44c
je 0x401bc3
mov ecx, dword [0x40e944]
push 4
push 8
push ecx
mov dword [ebp], 4
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], 0x58
mov eax, 1
jmp 0x401bf9
movzx eax, al
xor eax, dword [edi + 8]
push eax
call fcn.004025e4
mov edx, dword [0x40e944]
push 0x10
push 8
push edx
mov edi, eax
mov dword [ebp], 0x10
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi], eax
mov dword [eax], ebx
mov eax, dword [esi]
mov dword [eax + 4], edi
mov ecx, dword [esi]
mov dword [ecx + 8], ebx
xor eax, eax
mov ecx, dword [esp + 0x2a8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00402d06
add esp, 0x29c
ret