Function at 0x402dd1
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
jne 0x402dec
push 0xffffffffffffff9a
jmp 0x402dfc
mov esi, dword [eax + 0x9c]
cmp esi, edi
je 0x402de8
cmp dword [esi], edi
jne 0x402e02
push 0xffffffffffffff9c
pop eax
jmp 0x402fc2
mov ecx, dword [ebp + 0x10]
cmp ecx, edi
je 0x402fb6
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x5c]
cmp ecx, eax
jbe 0x402e20
mov dword [esi + 0x14], eax
cmp dword [esi + 0x14], edi
jbe 0x402fb1
jmp 0x402e2d
xor edi, edi
cmp dword [esi + 8], edi
jne 0x402efc
mov eax, dword [esi + 0x58]
cmp eax, edi
jbe 0x402efc
mov ebx, 0x4000
cmp eax, ebx
mov dword [ebp + 0x10], ebx
jae 0x402e5a
cmp eax, edi
mov dword [ebp + 0x10], eax
je 0x402fb6
mov ebx, eax
mov eax, dword [esi + 0x88]
push edi
add eax, dword [esi + 0x3c]
push eax
push dword [esi + 0x80]
push dword [esi + 0x7c]
call dword [esi + 0x70]
add esp, 0x10
test eax, eax
jne 0x402fba
push ebx
push dword [esi]
push dword [esi + 0x80]
push dword [esi + 0x7c]
call dword [esi + 0x64]
add esp, 0x10
cmp eax, ebx
jne 0x402fba
mov eax, dword [ebp + 8]
cmp dword [eax + 0xa0], edi
je 0x402eee
test ebx, ebx
jbe 0x402eec
mov eax, dword [esi]
lea ebx, [eax + edi]
mov eax, dword [ebp + 8]
push dword [eax + 0xb0]
add eax, 0xa4
push eax
call fcn.00402b4d
xor byte [ebx], al
mov eax, dword [esi]
movsx eax, byte [eax + edi]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0xb0]
add eax, 0xa4
push eax
call fcn.00402b68
mov ecx, dword [esi]
add esp, 0x14
mov byte [ecx + edi], al
inc edi
cmp edi, dword [ebp + 0x10]
jb 0x402ea5
mov ebx, dword [ebp + 0x10]
xor edi, edi
mov eax, dword [esi]
add dword [esi + 0x3c], ebx
sub dword [esi + 0x58], ebx
mov dword [esi + 4], eax
mov dword [esi + 8], ebx
cmp dword [esi + 0x84], edi
je 0x402f4e
cmp dword [esi + 0x8c], edi
jne 0x402f4e
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0x18]
mov dword [ebp + 0x10], eax
lea eax, [esi + 4]
push 2
push eax
call fcn.00404403
mov edi, dword [esi + 0x18]
mov dword [ebp - 8], eax
sub edi, ebx
push edi
push dword [ebp + 0x10]
push dword [esi + 0x50]
call fcn.00403152
sub dword [esi + 0x5c], edi
add dword [ebp - 4], edi
add esp, 0x14
cmp dword [ebp - 8], 1
mov dword [esi + 0x50], eax
je 0x402fb1
cmp dword [ebp - 8], 0
jne 0x402fbf
jmp 0x402fa1
mov eax, dword [esi + 8]
cmp eax, edi
jne 0x402f5a
cmp dword [esi + 0x58], edi
je 0x402fb1
mov edi, dword [esi + 0x14]
cmp edi, eax
jb 0x402f63
mov edi, eax
xor eax, eax
test edi, edi
jbe 0x402f7a
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x10]
mov cl, byte [eax + ecx]
mov byte [edx + eax], cl
inc eax
cmp eax, edi
jb 0x402f69
push edi
push dword [esi + 0x10]
push dword [esi + 0x50]
call fcn.00403152
sub dword [esi + 0x5c], edi
sub dword [esi + 8], edi
sub dword [esi + 0x14], edi
add dword [esi + 0x10], edi
add dword [esi + 4], edi
add dword [esi + 0x18], edi
add esp, 0xc
add dword [ebp - 4], edi
mov dword [esi + 0x50], eax
cmp dword [esi + 0x14], 0
ja 0x402e2b
cmp dword [ebp - 8], 0
jne 0x402fbf
mov eax, dword [ebp - 4]
jmp 0x402fc2
xor eax, eax
jmp 0x402fc2
or eax, 0xffffffff
jmp 0x402fc2
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret