Function at 0x403f86
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
push ebx
push ebp
sub esp, 0x2c
mov esi, edx
mov edi, eax
mov ebp, ecx
mov ecx, dword [esp + 0x50]
lea ebx, [edi + esi]
mov eax, dword [ebx - 8]
cmp eax, dword [ecx + 0x12c]
je 0x403fb1
xor eax, eax
add esp, 0x2c
pop ebp
pop ebx
pop edi
pop esi
ret 0x14
add esp, 0xfffffff4
mov ecx, 4
mov eax, dword [esp + 0x5c]
lea edx, [eax + 0x2c]
lea eax, [esp + 0x30]
call fcn.00404206
add esp, 0xfffffff4
mov ecx, 4
mov eax, dword [esp + 0x5c]
lea edx, [eax + 0x14]
lea eax, [esp + 0x34]
call fcn.00404206
add esi, 0xfffffff0
je 0x403fa5
xor edx, edx
mov dword [esp + 0x10], edx
xor ecx, ecx
mov dword [esp + 0x14], edx
mov edx, esi
mov dword [esp + 0x18], ebx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], ecx
mov dword [esp + 0x1c], ecx
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x20], edi
xor esi, esi
lea eax, [edi + ecx]
mov edi, edx
movzx edx, byte [esp + esi + 0x24]
cmp dl, byte [esi + eax + 1]
je 0x40402b
cmp edx, 0x3f
jne 0x4041e4
inc esi
cmp esi, 8
jb 0x404017
mov edi, dword [esp + 0x20]
lea edi, [edi + ecx + 1]
test edi, edi
je 0x404115
mov edx, dword [eax + 1]
mov esi, edx
shr esi, 8
mov ecx, edx
and esi, 0xff
shl ecx, 0x18
shl esi, 0x10
add ecx, esi
mov esi, edx
shr esi, 0x10
and esi, 0xff
mov eax, dword [esp + 0x50]
shl esi, 8
add ecx, esi
shr edx, 0x18
mov esi, dword [edi + 8]
add ecx, edx
lea edx, [edi + 8]
cmp esi, dword [eax + 8]
jne 0x404081
test ebp, ebp
je 0x4040ba
test ebp, ebp
je 0x4041d0
lea esi, [ebx + ecx]
cmp esi, dword [esp + 0x1c]
ja 0x4041a8
add ebx, ebp
add esp, 0xfffffff4
mov eax, ebx
call fcn.00404206
mov edx, dword [esp + 0x18]
mov ebx, esi
sub edx, edi
add edx, 0xfffffff0
je 0x40419a
xor ecx, ecx
jmp 0x40400c
mov esi, dword [esp + 0x4c]
mov ebp, dword [edx + 8]
mov dword [esp + 0xc], edx
mov esi, dword [esi + 0x4c]
add ebp, 0x10
mov dword [esp + 0x1c], ebp
jne 0x4040d7
mov ebp, dword [esi + 0x10c]
push ebp
push dword [esi + 0xec]
mov dword [esp + 8], edx
mov ebp, dword [esp + 0x54]
mov dword [esp + 0xc], ecx
call dword [ebp + 0x2c]
mov ecx, dword [esp + 4]
mov ebp, eax
mov edx, dword [esp]
add esp, 0xfffffff4
mov eax, ebp
mov dword [esp + 0x10], ecx
call fcn.00404206
mov edx, dword [esp + 0x18]
sub edx, edi
mov ecx, dword [esp + 4]
add ebx, ecx
add edx, 0xfffffff0
jne 0x4040b3
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebx
mov ebp, dword [esp + 8]
cmp dword [esp + 0x14], 0
je 0x403fa5
mov eax, dword [esp + 0xc]
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
test dl, 3
je 0x404141
dec edx
test dl, 3
jne 0x40413b
test edx, edx
jbe 0x404178
add edx, 3
mov ecx, edx
shr ecx, 3
je 0x404193
mov esi, dword [esp + 0x14]
xor ebx, ebx
xor dword [esi + ebx*8 + 0x10], eax
xor dword [esi + ebx*8 + 0x14], eax
inc ebx
cmp ebx, ecx
jb 0x404155
lea ebx, [ebx + ebx + 1]
shr edx, 2
lea ecx, [ebx - 1]
cmp ecx, edx
jae 0x404178
mov edx, dword [esp + 0x14]
xor dword [edx + ebx*4 + 0xc], eax
xor eax, eax
cmp dword [esp + 0x10], 0
mov ebx, 1
jmp 0x404166
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebx
mov ebp, dword [esp + 8]
jmp 0x40412c
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebx
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 8]
add esp, 0xfffffff4
mov esi, ebx
sub ecx, esi
mov ebx, dword [esp + 0x20]
lea eax, [esi + ebx]
call fcn.00404206
jmp 0x40412c
mov edx, dword [esp + 0x18]
sub edx, edi
add edx, 0xfffffff0
jne 0x4040b3
jmp 0x403fa5
mov edx, edi
inc ecx
mov edi, dword [esp + 0x20]
cmp ecx, edx
jb 0x40400c
jmp 0x404115