Function at 0x408d97
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x14]
mov edx, 0x2bff
push ebx
push ebp
mov ebp, dword [esp + 0x20]
lea ecx, [eax + 0x393]
xor ebp, 0x932
lea ebx, [eax - 0x2701]
mov dword [esp + 0x20], ebp
mov eax, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x1c]
add eax, 0xffffd122
mov dword [esp + 0x1c], ecx
xor edi, 0x27ff
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x28], eax
xor ecx, edx
mov eax, ebx
xor eax, 0x24ba
cmp edi, eax
je 0x40927a
mov eax, edi
xor eax, edx
push esi
mov esi, dword [esp + 0x1c]
cmp ebx, eax
je 0x4091f8
mov eax, dword [0x7242d4]
cmp eax, dword [esi + 0x30]
jae 0x408e14
mov eax, dword [0x6abc5c]
mov dword [eax + 0x40], 0x6d9870
xor edi, edi
mov ebp, edi
xor eax, eax
inc eax
sub eax, dword [0x724260]
add dword [esi + 0xb0], eax
mov ecx, dword [0x6abc5c]
mov eax, dword [ecx + 0x40]
mov ecx, dword [ecx + 0x48]
xor ecx, dword [esi + 0x50]
mov edx, dword [eax + ebp]
mov eax, 0x98834
sub eax, ecx
add ebp, 4
add dword [esi + 0x30], eax
mov eax, dword [0x7242d0]
xor eax, dword [0x724278]
mov ecx, dword [0x6abc5c]
sub eax, 0x98835
add dword [ecx + 0xb0], eax
mov eax, dword [esi + 0x44]
mov ebx, dword [0x72425c]
imul ebx, edx
lea ecx, [eax*2 + 0x9882c]
mov eax, dword [0x6abc5c]
mov edx, ebx
sub ecx, dword [eax + 0x48]
mov dword [esi + 0x44], ecx
mov ecx, dword [0x724264]
mov eax, dword [0x7242ac]
shr edx, 0x18
mov byte [ecx + eax], dl
mov edx, ebx
inc dword [0x724264]
mov eax, dword [0x6abc5c]
shr edx, 0x10
mov ecx, dword [eax + 0x34]
mov eax, dword [0x7242ac]
mov byte [eax + ecx], dl
mov ecx, 0x1e4cc
mov eax, dword [0x6abc5c]
mov edx, ebx
shr edx, 8
inc dword [eax + 0x34]
mov eax, dword [esi + 0x30]
sub eax, dword [esi + 0x70]
sub eax, 0x7c511645
xor dword [esi + 0x1c], eax
mov eax, dword [0x7242e0]
add eax, 0xfff030da
xor dword [esi + 0xc8], eax
mov eax, dword [0x6abc5c]
sub ecx, dword [eax + 0x4c]
add dword [0x7242e0], ecx
mov eax, dword [esi + 0x60]
xor eax, 0xe2f5ffed
imul eax, dword [esi + 8]
mov dword [esi + 8], eax
mov ecx, dword [0x6abc5c]
mov eax, dword [esi + 0x60]
xor eax, 0xe2f5ffec
sub dword [ecx + 0x48], eax
mov ecx, dword [esi + 0x34]
mov eax, dword [0x7242ac]
mov byte [eax + ecx], dl
inc dword [esi + 0x34]
mov ecx, dword [esi + 0x7c]
mov eax, dword [0x724264]
mov byte [eax + ecx], bl
inc dword [0x724264]
cmp ebp, 0x38a00
jl 0x408e18
mov eax, dword [esi + 8]
cmp eax, dword [esi + 0xa8]
jae 0x408f56
mov eax, dword [0x6abc5c]
mov eax, dword [eax + 0x50]
add eax, 0xa7b71
mov dword [0x72425c], eax
jmp 0x408f65
imul eax, dword [0x724238], 0x11af1
mov dword [0x724238], eax
mov ebp, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
lea eax, [ebp - 0x77a]
push eax
push dword [esp + 0x28]
mov eax, ecx
xor eax, 0x67b
push eax
push esi
lea eax, [ebp - 0x268]
push eax
lea eax, [ecx - 0x38a]
push eax
call fcn.00409dfe
add esp, 0x18
mov ebp, edi
mov eax, dword [esi + 0x40]
mov ebx, dword [eax + ebp]
add ebp, 4
mov eax, dword [0x6abc5c]
imul ebx, dword [0x72425c]
mov eax, dword [eax + 0x48]
sub eax, 0x98833
imul eax, dword [esi + 0x50]
mov edx, ebx
shr edx, 0x10
mov dword [esi + 0x50], eax
mov eax, dword [0x724290]
xor eax, dword [0x724260]
add eax, 0x1d0a0014
imul eax, dword [0x72430c]
mov dword [0x72430c], eax
mov ecx, dword [esi + 0x7c]
mov eax, dword [0x724264]
mov byte [eax + ecx], dl
mov edx, ebx
inc dword [0x724264]
mov eax, dword [0x724284]
add eax, 0xffe37ee4
shr edx, 8
xor dword [esi + 0x54], eax
mov eax, dword [0x6abc5c]
mov ecx, dword [eax + 0x34]
mov eax, dword [0x7242ac]
mov byte [eax + ecx], dl
mov eax, dword [0x6abc5c]
inc dword [eax + 0x34]
mov ecx, dword [esi + 0x7c]
mov eax, dword [0x724264]
mov byte [eax + ecx], bl
inc dword [0x724264]
mov eax, dword [esi + 0x44]
sub eax, dword [esi + 0x70]
sub eax, 0x7c51164c
add dword [esi + 0x80], eax
mov eax, dword [0x724238]
mov ecx, dword [0x7242a0]
add eax, 0xfff52fb6
xor ecx, eax
mov eax, dword [0x6abc5c]
mov dword [0x7242a0], ecx
mov eax, dword [eax + 0x54]
xor eax, ecx
xor eax, 0x83b268a0
sub dword [esi + 0x4c], eax
mov eax, dword [0x6abc5c]
mov ecx, dword [eax + 0xdc]
mov eax, dword [esi + 0x30]
add eax, 0xfff07278
add eax, ecx
imul eax, dword [esi + 0xdc]
mov dword [esi + 0xdc], eax
cmp ebp, 0x2d4d0
jl 0x408f99
mov eax, dword [esi + 0x48]
mov ebp, dword [esp + 0x28]
sub eax, 0xf189743
mov dword [esi + 0x2c], eax
mov dword [esi + 0x40], 0x712b80
mov edx, dword [0x6abc5c]
mov eax, 0x11b3f2
sub eax, dword [edx + 0x4c]
sub eax, dword [0x7242e0]
add dword [0x7242d0], eax
mov eax, dword [esi + 0xc8]
sub eax, 0x64
add dword [edx + 0xc8], eax
mov eax, dword [esi + 0x40]
mov ecx, dword [0x724264]
mov ebx, dword [edi + eax]
add edi, 4
imul ebx, dword [0x72425c]
mov eax, dword [0x7242ac]
mov edx, ebx
shr edx, 8
mov byte [ecx + eax], dl
inc dword [0x724264]
mov eax, dword [0x6abc5c]
mov eax, dword [eax + 0x8c]
add eax, dword [0x7242d0]
xor eax, 2
add dword [esi + 0x8c], eax
mov eax, 0x1e4cc
sub eax, dword [0x72427c]
add dword [esi + 0xa8], eax
mov eax, dword [esi + 0x44]
xor eax, dword [0x724260]
xor eax, 9
sub dword [esi + 0x48], eax
mov ecx, dword [0x6abc5c]
mov eax, dword [ecx + 0x50]
xor dword [ecx + 0x6c], eax
mov eax, dword [0x6abc5c]
mov ecx, dword [eax + 0x34]
mov eax, dword [esi + 0x7c]
mov byte [ecx + eax], bl
mov eax, dword [0x6abc5c]
inc dword [eax + 0x34]
mov eax, dword [0x6abc5c]
mov eax, dword [eax + 0xc8]
xor eax, dword [esi + 0x8c]
xor eax, 0x65
sub dword [esi + 0xa4], eax
mov eax, dword [0x72424c]
mov ecx, dword [0x6abc5c]
add eax, 0xffe1e399
or dword [0x7242d8], eax
mov eax, dword [0x7242d0]
dec eax
or dword [ecx + 0x50], eax
mov edx, dword [0x6abc5c]
mov eax, dword [edx + 0x80]
sub eax, dword [edx + 0x44]
sub eax, 0x1c6a80
xor dword [0x7242d4], eax
mov eax, 0x1ebdc7
sub eax, dword [edx + 0x4c]
sub eax, dword [esi + 0xa8]
add dword [0x724290], eax
mov eax, 0x605bc
mov ecx, dword [esi + 0xdc]
xor ecx, dword [0x724278]
sub eax, ecx
add dword [0x7242f8], eax
cmp edi, 0x113e8
jl 0x4090af
mov eax, dword [edx + 0x30]
add eax, dword [esi + 0x1c]
xor eax, 0x1e0e8a
mov dword [0x72425c], eax
jmp 0x409279
mov eax, dword [0x6abc5c]
mov eax, dword [eax + 0x44]
xor eax, dword [esi + 0xb8]
imul eax, eax, 0x2ede
xor dword [esi + 8], eax
mov edx, dword [esi + 0x1c]
imul edx, ecx
imul edx, ecx
mov ecx, dword [0x6abc5c]
mov eax, dword [ecx + 0x54]
and eax, edx
push eax
mov eax, dword [ecx + 0x44]
add eax, ebx
push eax
mov eax, dword [esi + 0x8c]
and eax, dword [esi + 0x50]
and eax, 0x27ec
push eax
imul eax, edi, 0x2701
push eax
mov eax, dword [esi + 0xa4]
xor eax, edx
push ecx
push eax
mov eax, dword [ecx + 0xa8]
and eax, dword [esp + 0x44]
sub eax, dword [esi + 0x30]
push eax
call fcn.00408d97
add esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ecx, dword [0x7242d4]
sub ecx, dword [0x7242bc]
push ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
pop esi
pop edi
mov eax, ebp
pop ebp
pop ebx
ret