Function at 0x402419
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov edx, 0xffffff9a
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x38
mov edi, dword [ebp + 8]
test edi, edi
je 0x402870
cmp dword [edi + 0x38], 0
je 0x402870
cmp dword [edi + 0x9c], 0
je 0x40244c
push edi
call fcn.0040239a
pop eax
push 0
mov dword [ebp - 0x24], 0
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x20], 0
add eax, dword [edi + 0x98]
mov dword [ebp - 0x28], 0
push eax
xor ebx, ebx
push dword [edi + 0x20]
push dword [edi + 0x1c]
call dword [edi + 0x10]
add esp, 0x10
test eax, eax
jne 0x4025fc
lea eax, [ebp - 0x2c]
mov edx, dword [edi + 0x20]
push eax
mov eax, edi
call fcn.00401537
pop esi
test eax, eax
je 0x40249b
or ebx, 0xffffffff
jmp 0x4024a9
cmp dword [ebp - 0x2c], 0x4034b50
je 0x4024a9
mov ebx, 0xffffff99
mov edx, dword [edi + 0x20]
lea esi, [ebp - 0x30]
mov eax, edi
push esi
call fcn.004014e1
pop ecx
test eax, eax
je 0x4024bf
or ebx, 0xffffffff
lea eax, [ebp - 0x34]
mov edx, dword [edi + 0x20]
push eax
mov eax, edi
call fcn.004014e1
pop edx
test eax, eax
je 0x4024d5
or ebx, 0xffffffff
mov edx, dword [edi + 0x20]
mov eax, edi
push esi
call fcn.004014e1
pop ecx
test eax, eax
je 0x4024ea
or ebx, 0xffffffff
jmp 0x402504
test ebx, ebx
jne 0x402504
mov eax, dword [ebp - 0x30]
cmp eax, dword [edi + 0x54]
jne 0x4024ff
test eax, eax
je 0x402504
cmp eax, 8
je 0x402504
mov ebx, 0xffffff99
mov edx, dword [edi + 0x20]
mov eax, edi
push esi
call fcn.00401537
pop edx
test eax, eax
je 0x402517
or ebx, 0xffffffff
mov edx, dword [edi + 0x20]
mov eax, edi
push esi
call fcn.00401537
pop ecx
test eax, eax
je 0x40252c
or ebx, 0xffffffff
jmp 0x402543
test ebx, ebx
jne 0x402543
mov eax, dword [edi + 0x5c]
cmp dword [ebp - 0x30], eax
je 0x402543
test byte [ebp - 0x34], 8
jne 0x402543
mov ebx, 0xffffff99
mov edx, dword [edi + 0x20]
mov eax, edi
push esi
call fcn.00401537
pop edx
test eax, eax
je 0x402558
or ebx, 0xffffffff
jmp 0x40256f
test ebx, ebx
jne 0x40256f
mov eax, dword [edi + 0x60]
cmp dword [ebp - 0x30], eax
je 0x40256f
test byte [ebp - 0x34], 8
jne 0x40256f
mov ebx, 0xffffff99
mov edx, dword [edi + 0x20]
mov eax, edi
push esi
call fcn.00401537
pop esi
test eax, eax
je 0x402584
or ebx, 0xffffffff
jmp 0x40259b
test ebx, ebx
jne 0x40259b
mov eax, dword [edi + 0x64]
cmp dword [ebp - 0x30], eax
je 0x40259b
test byte [ebp - 0x34], 8
jne 0x40259b
mov ebx, 0xffffff99
lea eax, [ebp - 0x38]
mov edx, dword [edi + 0x20]
push eax
mov eax, edi
call fcn.004014e1
pop ecx
test eax, eax
je 0x4025b3
or ebx, 0xffffffff
jmp 0x4025c4
test ebx, ebx
jne 0x4025c4
mov eax, dword [edi + 0x68]
cmp dword [ebp - 0x38], eax
je 0x4025c4
mov ebx, 0xffffff99
mov eax, dword [ebp - 0x38]
mov edx, dword [edi + 0x20]
add dword [ebp - 0x20], eax
lea eax, [ebp - 0x3c]
push eax
mov eax, edi
call fcn.004014e1
pop edx
test eax, eax
je 0x4025e0
or ebx, 0xffffffff
mov eax, dword [ebp - 0x38]
add eax, dword [edi + 0x98]
add eax, 0x1e
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0x20], eax
mov dword [ebp - 0x28], eax
test ebx, ebx
je 0x402606
mov edx, 0xffffff99
jmp 0x402870
push 0x90
call sub.msvcrt.dll_malloc
pop esi
mov ebx, eax
mov edx, 0xffffff98
test eax, eax
je 0x402870
push 0x4000
call sub.msvcrt.dll_malloc
mov edx, dword [ebp - 0x24]
mov dword [ebx + 0x4c], 0
mov dword [ebx + 0x44], edx
mov edx, dword [ebp - 0x28]
mov dword [ebx + 0x48], edx
mov edx, dword [ebp + 0x14]
mov dword [ebx], eax
mov dword [ebx + 0x8c], edx
pop ecx
test eax, eax
jne 0x40265e
push ebx
call fcn.004bdd30
pop edx
mov edx, 0xffffff98
jmp 0x402870
mov dword [ebx + 0x40], 0
cmp dword [ebp + 0xc], 0
je 0x402673
mov edx, dword [ebp + 0xc]
mov eax, dword [edi + 0x54]
mov dword [edx], eax
cmp dword [ebp + 0x10], 0
je 0x4026ba
mov eax, dword [ebp + 0x10]
mov dword [eax], 6
mov eax, dword [edi + 0x50]
and eax, 6
cmp eax, 4
je 0x4026a6
ja 0x402696
cmp eax, 2
je 0x4026b1
jmp 0x4026ba
cmp eax, 6
jne 0x4026ba
mov edx, dword [ebp + 0x10]
mov dword [edx], 1
jmp 0x4026ba
mov eax, dword [ebp + 0x10]
mov dword [eax], 2
jmp 0x4026ba
mov edx, dword [ebp + 0x10]
mov dword [edx], 9
mov eax, dword [edi + 0x5c]
mov edx, dword [edi + 0x54]
mov dword [ebx + 0x54], eax
mov eax, dword [edi + 0x20]
mov dword [ebx + 0x84], edx
mov dword [ebx + 0x80], eax
mov dword [ebx + 0x50], 0
lea eax, [ebx + 0x60]
push 0x20
push edi
push eax
call fcn.004bdd50
mov eax, dword [edi + 0x2c]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x88], eax
add esp, 0xc
cmp dword [edi + 0x54], 8
sete dl
xor eax, eax
cmp dword [ebp + 0x14], 0
sete al
test edx, eax
je 0x402761
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x2c], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
lea eax, [ebx + 4]
push 0x38
push 0x63a051
push 0xfffffffffffffff1
push eax
call fcn.004a8b93
add esp, 0x10
mov esi, eax
test eax, eax
jne 0x402753
mov dword [ebx + 0x40], 1
jmp 0x402761
push ebx
call fcn.004bdd30
pop eax
mov edx, esi
jmp 0x402870
mov eax, dword [edi + 0x60]
mov dword [edi + 0x9c], ebx
mov dword [ebx + 0x58], eax
mov eax, dword [edi + 0x64]
mov dword [ebx + 0x5c], eax
mov eax, dword [ebp - 0x20]
add eax, dword [edi + 0x98]
mov dword [ebx + 8], 0
add eax, 0x1e
mov dword [ebx + 0x3c], eax
cmp dword [ebp + 0x18], 0
je 0x40286e
call fcn.004aa3c0
lea esi, [edi + 0xa4]
mov dword [edi + 0xa4], 0x12345678
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x44], eax
mov dword [edi + 0xb0], eax
mov dword [esi + 4], 0x23456789
mov dword [esi + 8], 0x34567890
cmp byte [ebx], 0
je 0x4027d9
movsx eax, byte [ebx]
mov edx, dword [ebp - 0x44]
push eax
mov eax, esi
inc ebx
call fcn.00401457
pop eax
jmp 0x4027c2
push 0
mov eax, dword [edi + 0x9c]
mov edx, dword [eax + 0x88]
add edx, dword [eax + 0x3c]
push edx
push dword [edi + 0x20]
push dword [edi + 0x1c]
call dword [edi + 0x10]
add esp, 0x10
mov edx, 0xffffff98
test eax, eax
jne 0x402870
lea eax, [ebp - 0x1c]
push 0xc
push eax
push dword [edi + 0x20]
push dword [edi + 0x1c]
call dword [edi + 4]
add esp, 0x10
mov edx, 0xffffff98
cmp eax, 0xb
jbe 0x402870
mov dword [ebp - 0x40], 0
mov ebx, dword [edi + 0xb0]
lea esi, [edi + 0xa4]
mov edx, ebx
mov eax, esi
call fcn.00401440
mov edx, dword [ebp - 0x40]
xor al, byte [edx + ebp - 0x1c]
mov byte [edx + ebp - 0x1c], al
mov edx, ebx
movsx eax, al
push eax
mov eax, esi
call fcn.00401457
inc dword [ebp - 0x40]
pop eax
cmp dword [ebp - 0x40], 0xb
jle 0x402823
mov eax, dword [edi + 0x9c]
mov dword [edi + 0xa0], 1
add dword [eax + 0x3c], 0xc
xor edx, edx
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret