Function at 0x408170
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 - 0x2e37]
xor eax, 0x2fa8
mov dword [esp + 0xc], ecx
push edi
add esi, 0xffffc90e
mov dword [esp + 0x14], eax
lea edi, [ebx - 0xbcb]
mov dword [esp + 0x1c], esi
lea ebp, [ebx - 0x2fa8]
mov dword [esp + 0x3c], edi
xor edx, 0x2e37
lea eax, [ecx + 0x322e]
xor ebx, 0xa7e
mov dword [esp + 0x38], edx
mov dword [esp + 0x2c], ebx
cmp esi, eax
je 0x4082ee
lea eax, [ebp + 0x2bf7]
cmp esi, eax
je 0x40824e
push eax
push dword [0x93113c]
lea eax, [edi + 0x81a]
push eax
lea eax, [ebx + 0x621]
push eax
lea eax, [esi + 0x25d6]
push eax
mov eax, esi
xor eax, 0x322e
push eax
call fcn.0040b3b1
mov dword [esp + 0x50], eax
xor edi, 0x381c
mov eax, ebp
add edi, 0x1b31
xor eax, 0x2e37
push eax
mov eax, dword [esp + 0x2c]
add eax, 0x2fa8
push eax
lea eax, [ebp + 0x322e]
push eax
push edi
push dword [0x93113c]
call fcn.004079f6
mov edi, dword [esp + 0x60]
mov edx, eax
add esp, 0x2c
mov dword [esp + 0x3c], edx
jmp 0x4082f6
mov eax, dword [0x93113c]
mov edi, dword [esp + 0x34]
mov ecx, dword [eax + 0x7c]
mov eax, dword [edi + 0xdc]
add eax, 0x20d0
mov dword [esp + 0x18], ecx
cmp ecx, eax
jbe 0x4082f2
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 esi, ebx
mov eax, dword [edi]
imul edx, dword [edi + 0x70], 0x270f
sub eax, 0x2eec
and esi, dword [edi + 0xb8]
xor eax, ebx
push eax
imul ecx, ebp
sub edx, 0x25d6
push ecx
push edx
push dword [esp + 0x2c]
push esi
push dword [0x93113c]
push dword [esp + 0x3c]
call fcn.0040b654
mov ecx, dword [edi + 0xdc]
mov esi, eax
mov dword [esp + 0x38], eax
add ecx, 0x20d0
mov eax, dword [esp + 0x34]
add esp, 0x1c
add eax, 3
mov dword [esp + 0x18], eax
cmp eax, ecx
ja 0x408286
mov ebx, dword [esp + 0x2c]
jmp 0x4082f2
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
lea ecx, [ebx + 0x916]
cmp dword [esp + 0x38], ecx
jg 0x40836b
mov eax, dword [0x9768b0]
xor ebx, 0x15e2
add eax, 0xff4bc0c4
sub ebx, 0x1fd
imul eax, dword [edi + 0xa8]
xor ebp, 0x2a8c
push ebx
add ebp, 0x5a8
mov dword [edi + 0xa8], eax
mov eax, dword [esp + 0x18]
add eax, 0x2400
push eax
lea eax, [edx - 0x63f]
push eax
push ebp
push dword [0x93113c]
lea eax, [edx + 0x4e8]
push eax
mov eax, dword [esp + 0x28]
add eax, 0x270f
push eax
call fcn.0040ac13
add esp, 0x1c
add esi, 0x1c3e
jmp 0x4083e9
mov eax, dword [edi + 0x4c]
imul eax, dword [esp + 0x10]
cmp dword [esp + 0x10], eax
jbe 0x4083e9
mov ecx, dword [0x93113c]
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 [0x97693c]
imul esi, dword [esp + 0x1c]
mov edx, dword [0x9768c0]
and edx, dword [esp + 0x3c]
or edx, dword [0x976898]
mov edi, dword [0x9768c4]
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, 0x322e
push eax
push ecx
push ebx
push edx
push esi
push ebp
push edi
call fcn.0040a328
add esp, 0x1c
mov esi, eax
pop edi
lea eax, [esi + 0xfb9]
pop esi
pop ebp
pop ebx
add esp, 0x18
ret