Function at 0x403842
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push dword [ebp + 8]
xor bl, bl
call dword [0x409060]
mov esi, eax
push edi
push esi
mov dword [ebp - 0x10], esi
call dword [0x409088]
cmp eax, 0x34
push eax
jge 0x403895
push 0x409ae0
call fcn.00401ca8
pop ecx
pop ecx
push esi
call dword [0x4090bc]
xor al, al
jmp 0x403b4d
push 0x409ac0
call fcn.00401ca8
pop ecx
cmp esi, 0xffffffff
mov esi, dword [ebp + 0x10]
pop ecx
je 0x403b23
push edi
push edi
push 0xb
push dword [ebp - 0x10]
call dword [0x409084]
cmp eax, 0xb
jne 0x403b05
push edi
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x14], edi
call dword [0x409080]
test eax, eax
je 0x403af7
movzx eax, word [ebp - 8]
push eax
push 0x409aa8
call fcn.00401ca8
movzx eax, word [ebp - 8]
pop ecx
pop ecx
push edi
push edi
push eax
push dword [ebp - 0x10]
call dword [0x409084]
movzx ecx, word [ebp - 8]
cmp ecx, eax
jne 0x403ae9
push edi
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x14], edi
call dword [0x409080]
test eax, eax
je 0x403adb
mov ax, word [ebp - 0xc]
mov byte [ebp - 1], ah
mov byte [ebp - 2], al
movzx eax, al
push eax
movzx eax, byte [ebp - 1]
push eax
push 0x409a80
call fcn.00401ca8
add esp, 0xc
cmp byte [ebp - 1], 0
je 0x403acf
push edi
push dword [ebp - 0x10]
call dword [0x409088]
movzx ecx, word [ebp - 8]
push 0xfffffffffffffffe
pop edx
sub edx, ecx
add eax, edx
mov dword [esi], eax
mov dword [ebp - 0x14], edi
call dword [0x409068]
push eax
push dword [esi]
push 0x409a40
call fcn.00401ca8
push dword [esi]
call fcn.00402f32
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov ecx, dword [esi]
add esp, 0x10
cmp ecx, 0x24
jae 0x4039ac
push 0x409a08
call fcn.00401ca8
xor bl, bl
jmp 0x403b17
push edi
lea edx, [ebp - 0x14]
push edx
push ecx
push eax
push dword [ebp - 0x10]
call dword [0x409080]
test eax, eax
je 0x403ac1
call dword [0x409068]
push eax
push dword [ebp - 0x14]
push 0x4099d4
call fcn.00401ca8
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
add esp, 0xc
cmp dword [esi], edi
jbe 0x4039ef
mov cl, byte [ebp - 2]
xor byte [eax], cl
inc eax
inc edi
cmp edi, dword [esi]
jb 0x4039e4
add dword [esi], 0xffffffdc
push dword [esi]
push dword [ebx]
call fcn.004036fe
mov edi, dword [ebx]
add edi, dword [esi]
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x18]
push ecx
push 0x20
push eax
mov dword [ebp - 0x1c], eax
call fcn.0040307f
push dword [ebp - 0x18]
push 0x4099a0
call fcn.00401ca8
push dword [ebp - 0x18]
call fcn.00402f46
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x20
push edi
call fcn.0040307f
push dword [ebp - 0x18]
push 0x409974
call fcn.00401ca8
push dword [ebp - 0x18]
call fcn.00402f46
add esp, 0x40
push 0x20
push edi
push dword [ebp - 0x1c]
call fcn.00402f5a
push dword [ebp - 0x1c]
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
call fcn.00402f46
add esp, 0x10
test bl, bl
jne 0x403a82
push 0x409938
call fcn.00401ca8
xor edi, edi
jmp 0x403b17
push 0xa
call fcn.00402f32
push 0xa
mov edi, eax
push 0
push edi
call fcn.0040304c
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [esi]
push 4
lea eax, [eax + ecx + 0x20]
push eax
push edi
call fcn.00402f86
push edi
call 0x4061f0
mov ecx, dword [ebp + 0x14]
push edi
mov dword [ecx], eax
call fcn.00402f46
add esp, 0x24
xor edi, edi
jmp 0x403b18
call dword [0x409068]
push eax
push 0x4098f0
jmp 0x403b11
push 0x4098e0
call fcn.00401ca8
jmp 0x403b17
call dword [0x409068]
push eax
push 0x409898
jmp 0x403b11
call dword [0x409068]
push eax
push 0x409838
jmp 0x403b11
call dword [0x409068]
push eax
push 0x4097f0
jmp 0x403b11
call dword [0x409068]
push eax
push 0x409780
call fcn.00401ca8
pop ecx
pop ecx
push dword [ebp - 0x10]
call dword [0x4090bc]
jmp 0x403b3a
call dword [0x409068]
push eax
push dword [ebp + 8]
push 0x40973c
call fcn.00401ca8
add esp, 0xc
test bl, bl
jne 0x403b4b
mov eax, dword [ebp + 0xc]
push dword [eax]
call fcn.00402f46
pop ecx
mov dword [esi], edi
mov al, bl
pop edi
pop esi
pop ebx
leave
ret