Function at 0x531110
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push esi
push edi
mov edi, dword [ebp + 0x14]
push edi
mov dword [ebp - 0x34], 0
call fcn.004ca230
push edi
call fcn.004c9fe0
push edi
mov dword [ebp - 0x20], eax
call fcn.004c9fe0
push edi
mov dword [ebp - 0x1c], eax
call fcn.004c9fe0
mov esi, eax
push edi
mov dword [ebp - 0x2c], esi
call fcn.004c9fe0
mov edi, eax
add esp, 0x14
mov dword [ebp - 0x30], edi
test edi, edi
je 0x53158c
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 0x58]
push 6
push eax
push ebx
call fcn.00531e30
add esp, 0xc
test eax, eax
je 0x531570
cmp eax, 6
jg 0x531570
lea eax, [ebp - 0x58]
push eax
push dword [ebp + 0xc]
push esi
call fcn.00530cd0
add esp, 0xc
test eax, eax
je 0x53158b
push esi
call fcn.004a10c0
add esp, 4
test eax, eax
jne 0x53158b
push ebx
push edi
call fcn.004a0e30
add esp, 8
test eax, eax
je 0x53158b
push esi
call fcn.004a11a0
push edi
mov dword [ebp - 0x14], eax
call fcn.004a11a0
mov edi, dword [ebx + 4]
push edi
push esi
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], edi
call fcn.004a1920
add esp, 0x10
test eax, eax
je 0x53158b
mov edx, dword [ebp - 0x2c]
mov esi, dword [esi]
mov dword [ebp - 0x18], esi
mov eax, dword [edx + 4]
cmp eax, edi
jge 0x531202
mov ecx, dword [ebp - 4]
lea edi, [esi + eax*4]
sub ecx, eax
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
push edi
push dword [ebp - 0x20]
mov dword [edx + 4], edi
call fcn.004a1920
add esp, 8
test eax, eax
je 0x53158b
mov edx, dword [ebp - 0x20]
mov ebx, dword [edx]
mov dword [ebp - 0xc], ebx
mov dword [ebx], 1
cmp edi, 1
jle 0x531239
lea ecx, [edi - 1]
xor eax, eax
lea edi, [ebx + 4]
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
push edi
push dword [ebp - 0x1c]
mov dword [edx + 4], edi
call fcn.004a1920
add esp, 8
test eax, eax
je 0x53158b
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
mov dword [ebp - 0x10], edx
test edi, edi
jle 0x53126a
mov ecx, edi
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 4], edi
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
mov dword [ebp - 8], eax
test ecx, ecx
je 0x531344
mov ebx, dword [esi]
test bl, 1
jne 0x53133e
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax]
mov edx, eax
mov ecx, dword [ecx]
and edx, 1
neg edx
mov dword [ebp - 0x3c], edx
mov ecx, dword [ecx]
and ecx, edx
lea edx, [edi - 1]
xor eax, ecx
xor ecx, ecx
mov dword [ebp - 0x28], ecx
test edx, edx
jle 0x531320
mov ecx, dword [ebp - 0xc]
mov edx, esi
sub edx, ecx
mov dword [ebp - 0x40], edx
lea edi, [ecx + 4]
mov ecx, 0xfffffffc
sub ecx, dword [ebp - 0xc]
mov dword [ebp - 0x38], ecx
nop dword [eax]
mov edx, dword [edx + edi]
mov ecx, edx
shl ecx, 0x1f
shr ebx, 1
or ecx, ebx
shr eax, 1
mov ebx, dword [ebp - 0x28]
mov dword [esi + ebx*4], ecx
mov ebx, edx
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x18]
add edx, edi
mov ecx, dword [ecx]
mov edx, dword [edx + ecx + 4]
and edx, dword [ebp - 0x3c]
xor edx, dword [edi]
mov ecx, edx
shl ecx, 0x1f
or ecx, eax
mov eax, edx
mov edx, dword [ebp - 4]
mov dword [edi - 4], ecx
dec edx
mov ecx, dword [ebp - 0x28]
add edi, 4
inc ecx
cmp ecx, edx
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x40]
jl 0x5312d0
mov edi, dword [ebp - 4]
shr ebx, 1
mov dword [esi + ecx*4], ebx
mov ebx, dword [ebp - 0xc]
shr eax, 1
mov dword [ebx + ecx*4], eax
mov ecx, dword [ebp - 0x14]
sub ecx, 1
mov dword [ebp - 0x14], ecx
jne 0x531280
jmp 0x531341
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
cmp ecx, 0x20
jg 0x53135c
mov eax, dword [esi]
test eax, eax
je 0x53158b
cmp eax, 1
je 0x53154a
cmp ecx, dword [ebp - 0x24]
jge 0x53139b
mov ebx, dword [ebp - 0x30]
mov eax, ecx
mov ecx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], ebx
mov ebx, eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 8]
mov ebx, dword [ebx]
mov dword [ebp - 8], ebx
mov ebx, edx
mov edx, dword [eax]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], edx
xor edx, edx
test edi, edi
jle 0x5314f8
cmp edi, 4
jb 0x5314b0
mov esi, dword [ebp - 0x10]
lea eax, [edi - 1]
sub esi, 4
lea eax, [ebx + eax*4]
lea edi, [esi + edi*4]
mov esi, dword [ebp - 0x18]
cmp ebx, edi
ja 0x5313cd
cmp eax, dword [ebp - 0x10]
jae 0x5314ad
mov edi, dword [ebp - 4]
dec edi
lea edi, [esi + edi*4]
cmp ebx, edi
ja 0x5313e0
cmp eax, esi
jae 0x5314ad
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 4]
sub ebx, 4
lea esi, [ebx + esi*4]
mov ebx, dword [ebp - 0xc]
cmp ebx, esi
mov esi, dword [ebp - 0x18]
ja 0x5313ff
cmp eax, dword [ebp - 8]
jae 0x5314ad
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
dec ebx
lea eax, [ecx + ebx*4]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
cmp esi, eax
ja 0x53141c
cmp edi, dword [ebp - 0x10]
jae 0x5314ad
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
dec ebx
lea eax, [ecx + ebx*4]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
cmp esi, eax
ja 0x53143b
mov eax, dword [ebp - 8]
cmp edi, eax
jae 0x531542
mov ecx, dword [ebp - 4]
mov eax, ecx
and eax, reloc.WS2_32.dll_closesocket
jns 0x53144c
dec eax
or eax, 0xfffffffc
inc eax
mov ebx, dword [ebp - 8]
mov edi, ecx
sub ebx, esi
sub edi, eax
mov dword [ebp - 0x40], ebx
mov eax, esi
mov ebx, dword [ebp - 0x10]
sub ebx, esi
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x3c], ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x28], ebx
sub dword [ebp - 0x28], esi
mov ebx, dword [ebp - 0x40]
mov esi, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x28]
movups xmm0, xmmword [eax]
add edx, 4
lea eax, [eax + 0x10]
movups xmm1, xmmword [ebx + eax - 0x10]
pxor xmm1, xmm0
movups xmm0, xmmword [ecx + eax - 0x10]
movups xmmword [eax - 0x10], xmm1
movups xmm1, xmmword [esi + eax - 0x10]
pxor xmm1, xmm0
movups xmmword [ecx + eax - 0x10], xmm1
cmp edx, edi
jl 0x531477
mov esi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 8]
cmp edx, edi
jge 0x5314f8
sub eax, esi
lea ecx, [esi + edx*4]
mov dword [ebp - 0x40], eax
sub ebx, esi
mov eax, dword [ebp - 0x10]
sub eax, esi
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp - 0x40]
sub edi, edx
mov esi, dword [ebp - 0x38]
mov edx, eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ecx + ebx]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
mov eax, dword [ecx + edx - 4]
xor dword [ecx + esi - 4], eax
sub edi, 1
jne 0x5314d6
mov esi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x24]
jne 0x531278
lea eax, [ecx - 1]
cdq
and edx, 0x1f
lea edi, [edx + eax]
sar edi, 5
mov eax, dword [esi + edi*4]
test eax, eax
jne 0x531525
test edi, edi
je 0x531525
mov eax, dword [esi + edi*4 - 4]
dec edi
test eax, eax
je 0x531518
push eax
call fcn.004a1250
mov edx, dword [ebp - 0x10]
add esp, 4
shl edi, 5
lea ecx, [edi + eax]
mov edi, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
jmp 0x531278
mov edi, dword [ebp - 4]
jmp 0x5314b3
mov ebx, dword [ebp - 0x20]
push ebx
call fcn.004a17a0
push ebx
push dword [ebp + 8]
call fcn.004a0e30
xor ecx, ecx
add esp, 0xc
test eax, eax
mov edx, 1
cmovne ecx, edx
mov dword [ebp - 0x34], ecx
jmp 0x53158b
push 0x18e
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_bn_bn_gf2m.c
push 0x6a
push 0x83
push 3
call fcn.00457620
add esp, 0x14
pop ebx
push dword [ebp + 0x14]
call fcn.004c9ee0
mov eax, dword [ebp - 0x34]
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret