Function at 0x1004805c
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x24
cmp dword [ebx + 0xc], 2
mov eax, ecx
lea ecx, [eax + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ecx]
setne dh
cmp dword [ebx + 0xc], 1
push esi
mov esi, dword [ecx + 4]
sete dl
push edi
mov dword [ebp - 0x10], ecx
nop word [eax + eax]
mov edi, eax
mov dword [ebp - 0x18], esi
mov ecx, edi
shr ecx, 0xc
dec ecx
shl ecx, 0xc
xor ecx, edi
and ecx, 0x7f000
xor ecx, edi
mov eax, ecx
shr eax, 0x1e
and al, 1
or dl, al
or dh, al
mov byte [ebp - 3], dl
mov byte [ebp - 4], dh
jne 0x10048136
test esi, esi
je 0x10048136
lea eax, [ecx - 1]
mov byte [ebp - 5], 0
xor eax, ecx
and eax, 0xfff
xor eax, ecx
mov ecx, eax
shr ecx, 0x13
dec ecx
shl ecx, 0x13
xor ecx, eax
and ecx, 0x3ff80000
xor ecx, eax
mov eax, ecx
and eax, 0x7f000
sub esi, 1
je 0x10048106
test eax, eax
jne 0x10048106
mov dl, 1
jmp 0x10048108
xor dl, dl
mov byte [ebp - 1], dl
test ecx, 0x3ff80000
jne 0x10048130
test ecx, ecx
js 0x1004811b
test eax, eax
je 0x10048130
lea eax, [ecx + 0x80000]
mov byte [ebp - 2], 1
xor eax, ecx
and eax, 0x3ff80000
xor ecx, eax
jmp 0x10048185
mov byte [ebp - 2], 0
jmp 0x10048185
mov byte [ebp - 5], 1
mov eax, ecx
mov byte [ebp - 1], 0
mov byte [ebp - 2], 0
test dh, dh
je 0x100481b7
shr ecx, 0x13
dec ecx
shl ecx, 0x13
xor ecx, eax
and ecx, 0x3ff80000
xor ecx, eax
test ecx, 0x7f000
jne 0x100481b7
test dl, dl
je 0x1004819a
mov edx, ecx
mov eax, ecx
shl edx, 0x14
shr eax, 0x13
sar edx, 0x14
and eax, 0x7ff
sub eax, edx
mov edx, dword [ebp - 0xc]
add eax, dword [edx + 0x54]
setne dl
mov byte [ebp - 1], dl
test dl, dl
je 0x100481b7
lea eax, [ecx + 0x1000]
xor eax, ecx
and eax, 0x7f000
xor ecx, eax
jmp 0x100481b7
test esi, esi
je 0x100481b3
lea eax, [ecx + 0x1000]
mov byte [ebp - 1], 1
xor eax, ecx
and eax, 0x7f000
xor ecx, eax
jmp 0x100481b7
mov byte [ebp - 1], 0
mov edx, dword [ebp - 0x18]
mov eax, edi
push ebx
mov ebx, ecx
mov ecx, esi
mov esi, dword [ebp - 0x10]
lock cmpxchg8b qword [esi]
pop ebx
mov esi, edx
cmp eax, edi
jne 0x100481d4
cmp esi, dword [ebp - 0x18]
je 0x100481df
mov dl, byte [ebp - 3]
mov dh, byte [ebp - 4]
jmp 0x100480a0
cmp byte [ebp - 2], 0
je 0x100481f2
mov ecx, dword [ebp - 0xc]
push dword [ebx + 0x10]
push 1
mov eax, dword [ecx]
call dword [eax + 8]
cmp byte [ebp - 1], 0
je 0x100482e0
xor eax, eax
cmp byte [ebp - 3], al
sete al
inc eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
test byte [0x1009b9c0], 0x10
mov edi, eax
mov esi, dword [ebp - 0x18]
je 0x10048228
push edi
push esi
mov edx, 0x10089d50
call fcn.1003bc65
mov eax, dword [ebp - 0xc]
push 0
push esi
push edi
push dword [eax + 0x50]
call dword [sym.imp.kernel32.dll_PostQueuedCompletionStatus]
test eax, eax
je 0x1004824f
mov ecx, dword [ebp - 0xc]
mov esi, dword [ebx + 0x10]
push esi
push 0
mov eax, dword [ecx]
call dword [eax + 8]
jmp 0x100482e3
test byte [0x1009b9c0], 0x20
je 0x10048264
push edi
push esi
mov edx, 0x10089d30
call fcn.1003bc65
mov eax, dword [0x10097054]
mov ecx, 0x10097054
push 0x1c135e
call dword [eax + 4]
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
mov ecx, esi
mov edi, dword [eax + 4]
mov eax, esi
shr ecx, 0xc
mov edx, edi
dec ecx
mov dword [ebp - 0x18], esi
shl ecx, 0xc
xor ecx, esi
and ecx, 0x7f000
xor ecx, esi
mov esi, dword [ebp - 0x10]
push ebx
mov ebx, ecx
mov ecx, edi
lock cmpxchg8b qword [esi]
pop ebx
mov ecx, edx
cmp eax, dword [ebp - 0x18]
jne 0x100482b0
cmp ecx, edi
je 0x100482e0
mov esi, eax
mov dword [ebp - 0x18], ecx
shr esi, 0xc
mov edi, eax
dec esi
mov edx, ecx
shl esi, 0xc
xor esi, eax
and esi, 0x7f000
xor esi, eax
push ebx
mov ebx, esi
mov esi, dword [ebp - 0x10]
lock cmpxchg8b qword [esi]
pop ebx
mov ecx, edx
cmp eax, edi
jne 0x100482b0
cmp ecx, dword [ebp - 0x18]
jne 0x100482b0
mov esi, dword [ebx + 0x10]
cmp byte [ebp - 4], 0
je 0x10048329
cmp dword [ebx + 0xc], 3
jne 0x10048304
mov eax, dword [ebx + 8]
mov dword [esi], eax
mov eax, 3
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc
cmp byte [ebp - 3], 0
jne 0x1004831c
mov eax, dword [0x10097054]
mov ecx, 0x10097054
push 0x1c1394
call dword [eax + 4]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc
xor eax, eax
cmp byte [ebp - 5], al
pop edi
sete al
inc eax
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc