Function at 0x581590
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7a2c80
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x82f184]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x58], edx
mov esi, ecx
mov dword [ebp - 0x5c], esi
xor eax, eax
mov dword [ebp - 0x5c], esi
push eax
push 0x7cd378
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.004044f0
mov eax, dword [ebp - 0x58]
mov dword [ebp - 4], 0
mov eax, dword [eax]
cmp eax, 0x80000000
jne 0x581699
cmp byte [ebp + 8], 0
je 0x581610
push 3
push 0x7d8130
jmp 0x581871
mov dword [ebp - 0x50], 0x11
xor ecx, ecx
mov dword [ebp - 0x4c], 0xf200f0
mov dword [ebp - 0x48], 0xe200ff
mov dword [ebp - 0x44], 0xfe00e3
mov dword [ebp - 0x40], 0xfe00f2
mov dword [ebp - 0x3c], 0x920093
mov dword [ebp - 0x38], 0x900087
mov dword [ebp - 0x34], 0x97009b
mov dword [ebp - 0x30], 0x880089
mov dword [ebp - 0x2c], 0xc9009c
nop dword [eax + eax]
lea eax, [ecx + 0xb8]
xor word [ebp + ecx*2 - 0x4c], ax
inc ecx
mov eax, dword [ebp - 0x50]
cmp ecx, eax
jb 0x581660
xor ecx, ecx
mov word [ebp + eax*2 - 0x4c], cx
lea ecx, [ebp - 0x4c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x581680
sub ecx, edx
lea eax, [ebp - 0x4c]
sar ecx, 1
push ecx
push eax
jmp 0x581871
cmp eax, reloc.OLEAUT32.dll_SysReAllocString
jne 0x581751
cmp byte [ebp + 8], 0
je 0x5816e5
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 4
mov dword [ebp - 0x34], 0xf200f0
mov dword [ebp - 0x30], 0xf600f6
mov dword [ebp - 0x2c], 0xbc
call fcn.00403e20
mov edx, eax
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5816d5
jmp 0x58186b
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x54], 0x12
mov dword [ebp - 0x50], 0xf200f0
mov dword [ebp - 0x4c], 0xe200ff
mov dword [ebp - 0x48], 0xf100e3
mov dword [ebp - 0x44], 0xfc00f1
mov dword [ebp - 0x40], 0x8d0081
mov dword [ebp - 0x3c], 0x8e009d
mov dword [ebp - 0x38], 0x860085
mov dword [ebp - 0x34], 0x8e008e
mov dword [ebp - 0x30], 0x8c0086
mov dword [ebp - 0x2c], 0xca
call fcn.00403e20
mov edx, eax
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x581741
jmp 0x58186b
cmp eax, 0x80000001
jne 0x581802
cmp byte [ebp + 8], 0
je 0x5817a0
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 4
mov dword [ebp - 0x34], 0xf200f0
mov dword [ebp - 0x30], 0xee00f9
mov dword [ebp - 0x2c], 0xbc
call fcn.00403e20
mov edx, eax
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x581790
jmp 0x58186b
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x50], 0x11
mov dword [ebp - 0x4c], 0xf200f0
mov dword [ebp - 0x48], 0xe200ff
mov dword [ebp - 0x44], 0xfe00e3
mov dword [ebp - 0x40], 0xed00eb
mov dword [ebp - 0x3c], 0x840092
mov dword [ebp - 0x38], 0x97008c
mov dword [ebp - 0x34], 0x90009b
mov dword [ebp - 0x30], 0x820095
mov dword [ebp - 0x2c], 0xc9009a
call fcn.00403e20
mov edx, eax
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5817f5
jmp 0x58186b
cmp eax, reloc.WS2_32.dll_closesocket
jne 0x581879
cmp byte [ebp + 8], 0
je 0x581818
push 3
push 0x7d8128
jmp 0x581871
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], 0xa
mov dword [ebp - 0x40], 0xf200f0
mov dword [ebp - 0x3c], 0xe200ff
mov dword [ebp - 0x38], 0xe800e3
mov dword [ebp - 0x34], 0xfa00ed
mov dword [ebp - 0x30], 0x920092
mov dword [ebp - 0x2c], 0xc2
call fcn.00403e20
mov edx, eax
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x581860
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.004044f0
mov edi, dword [ebp - 0x58]
add edi, 4
cmp dword [edi + 0x10], 0
jne 0x5818ba
movups xmm0, xmmword [ebp - 0x28]
mov dword [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
mov word [ebp - 0x28], ax
movq xmm0, qword [ebp - 0x18]
movq qword [esi + 0x10], xmm0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
jmp 0x5818e5
push 0x7cd374
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00421b40
push edi
mov edx, eax
mov byte [ebp - 4], 1
mov ecx, esi
call fcn.00413520
add esp, 0x10
lea ecx, [ebp - 0x40]
call fcn.00404490
lea ecx, [ebp - 0x28]
call fcn.00404490
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0076d59e
mov esp, ebp
pop ebp
ret