Function at 0x59bd60
Capabilities:
Encode data using xor
Generate random numbers via winapi
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x160
mov edi, dword [ebp + 8]
mov eax, dword [0x87aa4c]
xor eax, ebp
mov dword [esp + 0x158], eax
xorps xmm0, xmm0
movaps xmmword [esp + 0x70], xmm0
movaps xmmword [esp + 0x60], xmm0
movaps xmmword [esp + 0x50], xmm0
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x20], xmm0
movaps xmmword [esp + 0x10], xmm0
test edi, edi
je 0x59c168
lea eax, [esp + 0x10]
push eax
call fcn.005b5000
add esp, 4
mov dword [esp + 0xc0], 0
sub esp, 0x14
movaps xmm0, xmmword [0x7d85f0]
movups xmmword [esp + 4], xmm0
lea ebx, [esp + 0xd4]
mov dword [esp], ebx
call dword [0x83400c]
test eax, eax
je 0x59be49
lea eax, [esp + 0x80]
push eax
push 0x20
push dword [esp + 0xc8]
call dword [0x834008]
cmp byte [0x889b68], 0
jne 0x59be11
test eax, eax
jne 0x59bfe0
push 2
call fcn.00700758
add esp, 4
mov edx, eax
movzx eax, byte [0x855f58]
cmp al, 0xb
je 0x59bfce
mov cl, 0xff
nop
mov al, 0xa6
lock cmpxchg byte [0x855f58], cl
je 0x59bf17
cmp al, 0xb
jne 0x59be30
jmp 0x59bfce
push 2
call fcn.00700758
add esp, 4
mov edx, eax
movzx eax, byte [0x855f3d]
cmp al, 0xcf
je 0x59bf00
mov cl, 0x6b
nop word cs:[eax + eax]
mov al, 0xe6
lock cmpxchg byte [0x855f3d], cl
je 0x59be82
cmp al, 0xcf
jne 0x59be70
jmp 0x59bf00
mov dword [esp + 4], edx
xor ecx, ecx
mov eax, 0xc19e603f
mov dword [esp], 0xc19e603e
mov esi, 0x8d3dcb09
nop dword [eax]
mov edi, eax
mul esi
mov ebx, edx
mov eax, dword [esp]
mul esi
shr edx, 4
imul eax, edx, 0xffffffe3
movzx eax, byte [eax + ecx - 0x3de419a2]
xor al, 0x53
add byte [ecx + 0x855f20], al
cmp ecx, 0x1c
je 0x59beea
shr ebx, 4
imul eax, ebx, 0xffffffe3
movzx eax, byte [eax + ecx - 0x3de419a1]
xor al, 0x53
add byte [ecx + 0x855f21], al
add ecx, 2
mov eax, edi
add eax, 2
add dword [esp], 2
jmp 0x59bea0
mov al, 0xcf
xchg byte [0x855f3d], al
mov edi, dword [ebp + 8]
lea ebx, [esp + 0xc0]
mov edx, dword [esp + 4]
push edx
push 1
push 0x1c
push 0x855f20
call fcn.00700a43
add esp, 0x10
jmp 0x59bfef
mov dword [esp + 8], edx
mov ecx, 0xffffffe8
lea edx, [0x522f33d3]
mov eax, 0xae4e5289
lea esi, [0x522f33d4]
mov edi, 0xae4e5288
nop word cs:[eax + eax]
mov dword [esp], eax
mov dword [esp + 4], edx
mov eax, dword [esp]
mov edx, 0x8d3dcb09
mul edx
mov ebx, edx
shr ebx, 4
lea eax, [ebx + ebx*8]
lea eax, [eax + eax*2]
mov dword [esp + 0xc], eax
mov eax, edi
mov edx, 0x8d3dcb09
mul edx
add ebx, ebx
add ebx, dword [esp + 0xc]
shr edx, 4
lea eax, [edx + edx*8]
lea eax, [eax + eax*2]
add edx, edx
add edx, eax
movzx eax, byte [ecx + 0x855f58]
xor al, byte [esi + edx]
mov edx, dword [esp + 4]
xor al, 0xf5
mov byte [ecx + 0x855f58], al
movzx eax, byte [ecx + 0x855f59]
xor al, byte [edx + ebx]
xor al, 0xf5
mov byte [ecx + 0x855f59], al
mov eax, dword [esp]
add edx, 0xfffffffe
add eax, 2
add esi, 0xfffffffe
add edi, 2
add ecx, 2
jne 0x59bf40
mov al, 0xb
xchg byte [0x855f58], al
mov edi, dword [ebp + 8]
lea ebx, [esp + 0xc0]
mov edx, dword [esp + 8]
push edx
push 1
push 0x17
push 0x855f40
call fcn.00700a43
add esp, 0x10
push 0
push dword [esp + 0xc4]
call dword [0x834004]
lea esi, [esp + 0x80]
push 0x20
push esi
lea eax, [esp + 0x18]
push eax
call fcn.005b5140
add esp, 0xc
mov dword [esp + 0xc4], 0
mov dword [esp + 0xc0], 0
mov dword [esp + 0x13c], 0
mov dword [esp + 0x138], 0
push ebx
call dword [0x83408c]
test eax, eax
je 0x59c091
call fcn.0059eaa0
mov ecx, dword [esp + 0xc0]
mov edx, dword [esp + 0xc4]
mov dword [esp + 0x84], edx
mov dword [esp + 0x80], ecx
mov dword [esp + 0x88], eax
lea eax, [esp + 0x138]
push eax
call fcn.00702cf1
add esp, 4
mov eax, dword [esp + 0x138]
mov ecx, dword [esp + 0x13c]
mov dword [esp + 0x90], ecx
mov dword [esp + 0x8c], eax
push 0x20
push esi
lea esi, [esp + 0x18]
push esi
call fcn.005b5140
add esp, 0xc
lea eax, [esp + 0xa0]
push esi
push eax
mov esi, eax
call fcn.005b5710
add esp, 8
xorps xmm0, xmm0
movaps xmmword [esp + 0x120], xmm0
movaps xmmword [esp + 0x110], xmm0
movaps xmmword [esp + 0x100], xmm0
movaps xmmword [esp + 0xf0], xmm0
movaps xmmword [esp + 0xe0], xmm0
movaps xmmword [esp + 0xd0], xmm0
movaps xmmword [esp + 0xc0], xmm0
push ebx
call fcn.005b5000
add esp, 4
push 0x20
push esi
push ebx
call fcn.005b5140
add esp, 0xc
push 0x10
push edi
push ebx
call fcn.005b5140
add esp, 0xc
lea eax, [edi + 0x10]
push 0x10
push eax
push ebx
call fcn.005b5140
add esp, 0xc
lea esi, [esp + 0x138]
push ebx
push esi
call fcn.005b5710
add esp, 8
lea eax, [edi + 0x28]
push 0
push 0
push 0x10
push esi
push eax
call fcn.00592fd0
add esp, 0x14
movups xmm0, xmmword [esp + 0x138]
movups xmmword [edi + 0x10], xmm0
movups xmm0, xmmword [esp + 0x148]
movups xmmword [edi], xmm0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 1
mov ecx, dword [esp + 0x158]
xor ecx, ebp
call fcn.00719989
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret