Function at 0x408146
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
mov edx, dword [esp + 0x28]
push ebx
mov ebx, dword [esp + 0x20]
mov eax, ebx
push ebp
push esi
mov esi, dword [esp + 0x38]
lea ecx, [edx + 0x747]
xor eax, 0xf78
mov dword [esp + 0xc], ecx
push edi
add esi, 0xfffffd7a
mov dword [esp + 0x14], eax
lea edi, [ebx + 0x557]
mov dword [esp + 0x1c], esi
lea ebp, [ebx + 0x9bc]
mov dword [esp + 0x3c], edi
xor edx, 0x3b31
lea eax, [ecx - 0x3ca]
xor ebx, 0xa5c
mov dword [esp + 0x38], edx
mov dword [esp + 0x2c], ebx
cmp esi, eax
je 0x4082c4
lea eax, [ebp - 0x627]
cmp esi, eax
je 0x40822a
lea eax, [ebp + 0x51d]
push eax
push dword [0x93537c]
lea eax, [edi + 0x465]
push eax
lea eax, [ebx + 0x3ab]
push eax
lea eax, [esi + 0x596]
push eax
mov eax, esi
xor eax, 0x1fe
push eax
call fcn.0040b3b0
mov dword [esp + 0x50], eax
xor edi, 0x1613
mov eax, ebp
sub edi, 0x13f6
xor eax, 0x951
push eax
mov eax, dword [esp + 0x2c]
add eax, 0x6e1
push eax
lea eax, [ebp - 0xe4e]
push eax
push edi
push dword [0x93537c]
call fcn.004079ec
mov edi, dword [esp + 0x60]
mov edx, eax
add esp, 0x2c
mov dword [esp + 0x3c], edx
jmp 0x4082cc
mov eax, dword [0x93537c]
mov edi, dword [esp + 0x34]
mov ecx, dword [eax + 0x7c]
mov eax, dword [edi + 0xdc]
add eax, 0x1c3e
mov dword [esp + 0x18], ecx
cmp ecx, eax
jbe 0x4082c8
mov eax, edx
imul eax, ebp
mov dword [esp + 0x20], eax
mov eax, ebx
mov ebx, dword [esp + 0x10]
xor eax, ebp
mov dword [esp + 0x24], eax
mov ecx, dword [edi + 0xc4]
mov eax, dword [edi]
imul edx, dword [edi + 0x70], 0x1c3e
sub eax, 0x25d6
mov esi, dword [edi + 0xb8]
xor eax, ebx
push eax
imul ecx, ebp
and esi, ebx
sub edx, 0x2a8c
push ecx
push edx
push dword [esp + 0x2c]
push esi
push dword [0x93537c]
push dword [esp + 0x3c]
call fcn.0040b670
mov ecx, dword [edi + 0xdc]
mov esi, eax
mov dword [esp + 0x38], eax
add esp, 0x1c
mov eax, dword [esp + 0x18]
add ecx, 0x1c3e
inc eax
mov dword [esp + 0x18], eax
cmp eax, ecx
ja 0x40825e
mov ebx, dword [esp + 0x2c]
jmp 0x4082c8
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
lea ecx, [ebx + 0x51c]
cmp dword [esp + 0x38], ecx
jg 0x40833e
mov eax, dword [0x972de0]
xor ebx, 0xe8c
add eax, 0xff4bc0c4
add ebx, 0xa56
imul eax, dword [edi + 0xa8]
xor ebp, 0x4bb
push ebx
sub ebp, 0x3ab
mov dword [edi + 0xa8], eax
mov eax, dword [esp + 0x18]
add eax, 0xfffff435
push eax
lea eax, [edx + 0x1f]
push eax
push ebp
push dword [0x93537c]
lea eax, [edx - 0x240]
push eax
mov eax, dword [esp + 0x28]
add eax, 0x1de
push eax
call fcn.0040ac06
add esp, 0x1c
sub esi, 0x13e7
jmp 0x4083bc
mov eax, dword [edi + 0x4c]
imul eax, dword [esp + 0x10]
cmp dword [esp + 0x10], eax
jbe 0x4083bc
mov ecx, dword [0x93537c]
xor ebp, dword [esp + 0x14]
mov eax, dword [ecx + 0xa4]
or eax, dword [esp + 0x14]
imul eax, edx
or dword [ecx + 0x18], eax
mov esi, dword [0x972e6c]
imul esi, dword [esp + 0x1c]
mov edx, dword [0x972df0]
and edx, dword [esp + 0x3c]
or edx, dword [0x972dc8]
mov edi, dword [0x972df4]
and esi, ebx
add edi, 0xffffd058
mov ebx, dword [esp + 0x34]
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x68]
sub eax, dword [esp + 0x10]
xor ecx, dword [esp + 0x1c]
or eax, dword [esp + 0x3c]
xor ecx, 0x3537
push eax
push ecx
push ebx
push edx
push esi
push ebp
push edi
call fcn.0040a31d
add esp, 0x1c
mov esi, eax
pop edi
lea eax, [esi + 0x1b31]
pop esi
pop ebp
pop ebx
add esp, 0x18
ret