Function at 0x413880
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
sub esp, 0x588
mov eax, dword [0x51eed4]
xor eax, esp
mov dword [esp + 0x584], eax
mov eax, dword [esp + 0x58c]
push ebx
mov ebx, dword [0x526d20]
push ebp
neg ebx
sbb ebx, ebx
and ebx, dword [0x5242d0]
push esi
push edi
xor edi, edi
push 0x4460
mov dword [esp + 0x44], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x48], edi
call fcn.004c1f63
add esp, 4
push 0x4460
mov ebp, eax
push edi
push ebp
call fcn.004bfe20
mov esi, dword [sym.imp.KERNEL32.dll_VirtualLock]
add esp, 0xc
push 0x4460
push ebp
call esi
cmp ebp, edi
jne 0x4138f9
xor ebp, ebp
jmp 0x413900
mov dword [ebp], 0xffffffff
mov dword [0x526aec], ebp
cmp ebp, edi
je 0x413983
cmp ebx, 1
jbe 0x41398d
push 0x430
call fcn.004c1f63
mov edi, eax
add esp, 4
mov dword [esp + 0x24], edi
test edi, edi
je 0x413983
push 0
push 0
mov eax, 1
push 0
push 0
mov dword [edi + 0x100], eax
mov dword [edi + 0x20c], eax
mov dword [edi + 0x318], eax
mov dword [edi + 0x424], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esp + 0x20], eax
test eax, eax
je 0x41397a
push 0
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esp + 0x28], eax
test eax, eax
jne 0x41398d
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.004c1e86
add esp, 4
mov eax, 2
jmp 0x4142a8
push 0x248
lea eax, [esp + 0x4c]
push eax
call esi
push 0x100
lea ecx, [esp + 0x294]
push ecx
call esi
mov edx, dword [esp + 0x1c]
mov edi, dword [edx]
lea edx, [esp + 0x50]
mov ecx, 0x100
mov dword [esp + 0x4c], edi
mov esi, ecx
mov eax, edx
nop
mov byte [eax], 0
inc eax
sub esi, 1
jne 0x4139c0
lea esp, [esp]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x4139d0
mov eax, dword [esp + 0x1c]
push edi
add eax, 4
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.004c0830
mov esi, dword [esp + 0x4c]
mov ecx, 0x10
lea edi, [esp + 0x15c]
mov edx, 1
add esp, 0xc
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x18], edx
lea ebx, [ebx]
cmp edx, 4
jle 0x413a20
cmp dword [esp + 0x14], 0
jbe 0x413f8d
xor edi, edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x2c], edi
cmp ebx, 1
jbe 0x413b88
cmp dword [esp + 0x14], ebx
jae 0x413ae1
cmp edx, 4
jg 0x413ae1
mov eax, dword [esp + 0x24]
xor ecx, ecx
lea esp, [esp]
cmp dword [eax + 0x100], edi
jne 0x413a65
inc ecx
add eax, 0x10c
cmp ecx, 4
jl 0x413a50
jmp 0x413ad6
lea ecx, [edx - 1]
lea esi, [eax + 0x104]
mov dword [eax + 0x100], edi
mov dword [esi], edi
mov dword [eax + 0x108], edx
cmp ecx, 3
ja case.default.0x413a81
jmp dword [ecx*4 + 0x4142c4]
mov ecx, 0x7d0
jmp 0x413a9f
mov ecx, 0x3e8
jmp 0x413a9f
mov byte [0], 0
xor ecx, ecx
push eax
mov eax, dword [esp + 0x50]
push ecx
lea edx, [esp + 0x158]
push edx
mov edx, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x60]
push ecx
push edx
lea eax, [esp + 0x38]
push esi
push eax
lea edi, [esp + 0x64]
lea ebx, [esp + 0x48]
call fcn.00413720
mov edx, dword [esp + 0x38]
add esp, 0x20
inc dword [esp + 0x14]
cmp edx, 4
jl 0x413f7c
jmp 0x413ae6
dec edx
mov dword [esp + 0x18], edx
cmp dword [esp + 0x14], 0
jbe 0x413f7c
mov esi, dword [esp + 0x24]
xor edi, edi
add esi, 0x104
cmp dword [esi - 4], 0
lea ebx, [esi - 0x104]
jne 0x413b17
push 0
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
cmp eax, 1
je 0x413b32
inc edi
add esi, 0x10c
cmp edi, 4
jl 0x413afd
mov ecx, dword [esp + 0x20]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x413af1
mov eax, dword [ebx + 0x108]
mov dword [esp + 0x38], eax
dec eax
cmp eax, 3
ja case.default.0x413b42
jmp dword [eax*4 + 0x4142d4]
mov eax, 0x7d0
jmp 0x413b60
mov eax, 0x3e8
jmp 0x413b60
mov byte [0], 0
xor eax, eax
mov dword [esp + 0x48], eax
mov ecx, 0x40
mov esi, ebx
lea edi, [esp + 0x290]
mov eax, 1
sub dword [esp + 0x14], eax
rep movsd dword es:[edi], dword [esi]
mov dword [ebx + 0x100], eax
jmp 0x413c7c
lea eax, [edx - 1]
mov dword [esp + 0x38], edx
cmp eax, 3
ja case.default.0x413b94
jmp dword [eax*4 + 0x4142e4]
mov esi, 0x7d0
jmp 0x413bb2
mov esi, 0x3e8
jmp 0x413bb2
mov byte [0], 0
xor esi, esi
mov dword [esp + 0x48], esi
cmp eax, 3
ja case.default.0x413bbf
jmp dword [eax*4 + 0x4142f4]
call fcn.00411f00
lea edx, [esp + 0x290]
push edx
mov edx, dword [esp + 0x50]
push esi
lea ecx, [esp + 0x158]
push ecx
push edx
mov ecx, eax
lea edx, [esp + 0x60]
call fcn.00415140
add esp, 0x10
jmp 0x413c7c
call fcn.00411f00
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x290]
push ecx
push esi
push edx
lea ecx, [esp + 0x5c]
push ecx
mov ecx, eax
lea edx, [esp + 0x160]
call fcn.00414770
add esp, 0x10
jmp 0x413c7c
call fcn.00411f00
lea edx, [esp + 0x290]
push edx
mov edx, dword [esp + 0x50]
push esi
lea ecx, [esp + 0x158]
push ecx
push edx
mov ecx, eax
lea edx, [esp + 0x60]
call fcn.00414cc0
add esp, 0x10
jmp 0x413c7c
call fcn.00411f00
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x290]
push ecx
push esi
push edx
lea ecx, [esp + 0x5c]
push ecx
mov ecx, eax
lea edx, [esp + 0x160]
call fcn.004156b0
add esp, 0x10
jmp 0x413c7c
mov byte [0], 0
mov dword [ebp + 4], 1
mov eax, dword [ebp + 4]
add eax, 0xfffffffe
cmp eax, 3
ja 0x413cac
lea edi, [ebp + 0x42a8]
mov ecx, 8
lea esi, [esp + 0x290]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x1c], 0x20
jmp 0x413cb4
mov dword [esp + 0x1c], 0
mov dword [ebp], 1
mov edi, 1
mov edx, dword [ebp + 4]
mov esi, dword [ebp]
push edx
mov ebx, esi
call fcn.00411190
add esp, 4
test eax, eax
je 0x413f49
mov ecx, dword [0x521338]
mov eax, esi
imul eax, eax, 0x2c
mov edx, dword [eax + 0x5213c8]
xor eax, eax
test ecx, ecx
je 0x413d08
cmp ecx, edx
je 0x413d75
add eax, edi
lea ecx, [eax + eax*4]
mov ecx, dword [ecx*4 + 0x521338]
test ecx, ecx
jne 0x413cf0
xor eax, eax
mov edx, dword [esp + 0x1c]
mov ebx, dword [eax + 8]
lea ecx, [esp + edx + 0x290]
push ecx
lea eax, [ebp + 8]
push esi
call fcn.00410d80
mov esi, eax
add esp, 8
cmp esi, 0x11
je 0x414181
mov eax, dword [ebp + 4]
cmp eax, edi
jne 0x413d81
mov esi, dword [ebp]
mov edx, esi
call fcn.00410f40
push eax
mov edx, esi
call fcn.00410f40
lea edx, [esp + eax + 0x294]
push edx
lea eax, [ebp + 0x42a8]
push eax
call fcn.004c0830
add esp, 0xc
mov esi, ebp
call fcn.00410ea0
test eax, eax
jne 0x413dbf
mov esi, 0x1b
jmp 0x414181
lea eax, [eax + eax*4]
lea eax, [eax*4 + 0x521338]
jmp 0x413d0a
cmp eax, 2
jne 0x413dbf
cmp ebx, 8
jne 0x413d94
cmp dword [esp + 0x34], 0
je 0x413da0
jmp 0x413dbf
cmp ebx, 0x10
jne 0x413dbf
cmp dword [esp + 0x2c], 0
jne 0x413dbf
mov esi, ebp
call fcn.00410ea0
test eax, eax
je 0x413d6b
cmp ebx, 8
jne 0x413db6
mov dword [esp + 0x34], edi
jmp 0x413dbf
cmp ebx, 0x10
jne 0x413dbf
mov dword [esp + 0x2c], edi
mov esi, dword [esp + 0x40]
mov ecx, 0x80
lea edi, [esp + 0x390]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x3d0]
push ecx
mov eax, ebp
call fcn.00411930
mov eax, dword [esp + 0x3d4]
mov edx, eax
shr edx, 8
movzx ecx, dl
movzx edx, al
shl edx, 8
or ecx, edx
mov edx, eax
shr edx, 0x10
shl ecx, 8
movzx edx, dl
or ecx, edx
shl ecx, 8
shr eax, 0x18
or ecx, eax
add esp, 4
cmp ecx, 0x464c4b37
jne 0x413f49
mov ax, word [esp + 0x3d4]
rol ax, 8
movzx ecx, ax
mov dword [esp + 0x3c], ecx
cmp cx, 4
ja 0x413fa9
cmp dword [0x526d28], 0
jne 0x413eb1
cmp cx, 4
jb 0x413eb1
mov ebx, dword [esp + 0x48c]
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
movzx edx, bl
shl edx, 8
or ecx, edx
mov eax, ebx
shr eax, 0x10
movzx edx, al
shl ecx, 8
or ecx, edx
mov edx, 0xbc
lea esi, [esp + 0x3d0]
or eax, 0xffffffff
lea ebx, [ebx]
movzx edi, byte [esi]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x520f20]
dec edx
inc esi
test edx, edx
jne 0x413e80
shr ebx, 0x18
shl ecx, 8
or ebx, ecx
not eax
cmp ebx, eax
jne 0x413f49
mov ecx, dword [esp + 0x3c]
mov ax, word [esp + 0x3d6]
rol ax, 8
movzx eax, ax
mov edx, 0x700
cmp ax, dx
mov word [ebp + 0x4438], ax
sbb eax, eax
neg eax
cmp dword [0x526d28], 0
mov dword [ebp + 0x443c], eax
jne 0x413f9b
mov ebx, dword [esp + 0x3d8]
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
movzx edx, bl
shl edx, 8
or ecx, edx
mov eax, ebx
shr eax, 0x10
movzx edx, al
shl ecx, 8
or ecx, edx
mov edx, 0x100
lea esi, [esp + 0x490]
or eax, 0xffffffff
lea esp, [esp]
movzx edi, byte [esi]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x520f20]
dec edx
inc esi
test edx, edx
jne 0x413f20
shr ebx, 0x18
shl ecx, 8
or ebx, ecx
not eax
cmp ebx, eax
je 0x413f97
mov ecx, dword [ebp]
mov edi, 1
add ecx, edi
mov eax, ecx
imul eax, eax, 0x2c
mov eax, dword [eax + 0x5213c8]
neg eax
sbb eax, eax
and eax, ecx
mov dword [ebp], eax
test eax, eax
jne 0x413cc0
add dword [ebp + 4], edi
cmp dword [ebp + 4], 5
jle 0x413c83
inc dword [esp + 0x18]
mov ebx, dword [esp + 0x30]
mov edx, dword [esp + 0x18]
jmp 0x413a10
mov esi, 3
jmp 0x41417c
mov ecx, dword [esp + 0x3c]
mov edx, 0x700
cmp word [ebp + 0x4438], dx
jbe 0x413fb3
mov esi, 0x10
jmp 0x41417c
mov word [ebp + 0x29a4], cx
mov eax, dword [esp + 0x3e0]
mov ecx, dword [esp + 0x3dc]
push eax
push ecx
call fcn.004134a0
mov dword [ebp + 0x43f0], eax
mov dword [ebp + 0x43f4], edx
mov edx, dword [esp + 0x3f0]
mov eax, dword [esp + 0x3ec]
push edx
push eax
call fcn.004134a0
mov dword [ebp + 0x43f8], eax
mov dword [ebp + 0x43fc], edx
mov ecx, dword [esp + 0x400]
mov edx, dword [esp + 0x3fc]
push ecx
push edx
call fcn.004134a0
add esp, 0x18
mov dword [ebp + 0x4410], eax
or eax, edx
mov dword [ebp + 0x4414], edx
je 0x41402b
mov eax, 1
jmp 0x41402d
xor eax, eax
mov dword [ebp + 0x29a0], eax
mov ecx, dword [esp + 0x3f8]
mov edx, dword [esp + 0x3f4]
push ecx
push edx
call fcn.004134a0
mov dword [ebp + 0x4440], eax
mov dword [ebp + 0x4444], edx
mov eax, dword [esp + 0x408]
mov ecx, dword [esp + 0x404]
push eax
push ecx
call fcn.004134a0
mov dword [ebp + 0x4448], eax
mov dword [ebp + 0x444c], edx
mov edx, dword [esp + 0x418]
mov eax, dword [esp + 0x414]
push edx
push eax
call fcn.004134a0
mov dword [ebp + 0x4454], edx
mov dword [ebp + 0x4450], eax
mov eax, dword [esp + 0x424]
mov ecx, eax
shr ecx, 8
movzx edx, cl
movzx ecx, al
shl ecx, 8
or edx, ecx
mov ecx, eax
shr ecx, 0x10
movzx ecx, cl
shl edx, 8
or edx, ecx
shl edx, 8
shr eax, 0x18
or edx, eax
mov dword [ebp + 0x4458], edx
mov edx, dword [esp + 0x50]
mov ecx, 0x40
lea esi, [esp + 0x4a8]
lea edi, [esp + 0x1a8]
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x41a8]
mov ecx, 0x40
lea esi, [esp + 0x1a8]
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x43a8]
mov ecx, 0x10
lea esi, [esp + 0x168]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x34]
mov dword [ebp + 0x43ec], edx
mov eax, dword [esp + 0x60]
lea edx, [esp + ecx + 0x1a8]
mov ecx, dword [ebp]
push edx
mov dword [ebp + 0x43e8], eax
lea eax, [ebp + 8]
push ecx
call fcn.00410d80
add esp, 0x20
mov edx, 1
mov dword [ebp], 1
mov dword [ebp + 4], 1
call fcn.00410f40
push eax
mov edx, 1
call fcn.00410f40
lea edx, [esp + eax + 0x194]
push edx
lea eax, [ebp + 0x42a8]
push eax
call fcn.004c0830
add esp, 0xc
mov esi, ebp
call fcn.00410ea0
test eax, eax
jne 0x4141cc
lea esi, [eax + 0x1b]
mov edi, 1
mov ecx, 0x4460
mov edx, ebp
mov ebx, ecx
mov eax, ebp
lea esp, [esp]
mov byte [eax], 0
add eax, edi
sub ebx, edi
jne 0x414190
lea esp, [esp]
sub ecx, edi
mov byte [edx], 0
add edx, edi
test ecx, ecx
jne 0x4141a0
push 0x4460
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push ebp
call fcn.004c1e86
add esp, 4
mov dword [0x526aec], 0
jmp 0x4141ce
xor esi, esi
lea edx, [esp + 0x48]
mov ecx, 0x248
mov edi, ecx
mov eax, edx
jmp 0x4141e0
mov byte [eax], 0
inc eax
sub edi, 1
jne 0x4141e0
lea esp, [esp]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x4141f0
lea edx, [esp + 0x290]
mov ecx, 0x100
mov edi, ecx
mov eax, edx
lea esp, [esp]
mov byte [eax], 0
inc eax
sub edi, 1
jne 0x414210
lea esp, [esp]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x414220
mov edi, dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push 0x248
lea ecx, [esp + 0x4c]
push ecx
call edi
push 0x100
lea edx, [esp + 0x294]
push edx
call edi
cmp dword [esp + 0x30], 1
jbe 0x4142a6
mov eax, dword [esp + 0x28]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [esp + 0x24]
mov ecx, 0x430
mov edx, ebx
mov edi, ecx
mov eax, ebx
lea ecx, [ecx]
mov byte [eax], 0
inc eax
sub edi, 1
jne 0x414270
lea esp, [esp]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x414280
push ebx
call fcn.004c1e86
mov ecx, dword [esp + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push ecx
call edi
mov edx, dword [esp + 0x28]
push edx
call edi
mov eax, esi
mov ecx, dword [esp + 0x594]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004be1d6
add esp, 0x588
ret