Function at 0x401fde
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
test ebx, ebx
je 0x402437
cmp dword [ebx + 0x38], 0
je 0x402437
cmp dword [ebx + 0x9c], 0
je 0x402010
mov dword [esp], ebx
call fcn.00401ca5
mov dword [esp + 0xc], 0
mov eax, dword [ebx + 0x2c]
add eax, dword [ebx + 0x98]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call dword [ebx + 0x10]
test eax, eax
jne 0x40243e
lea ecx, [ebp - 0x1c]
mov edx, dword [ebx + 0x20]
mov eax, ebx
or esi, 0xffffffff
call fcn.0040141b
test eax, eax
jne 0x402062
cmp dword [ebp - 0x1c], 0x4034b50
sete al
movzx esi, al
dec esi
and esi, 0xffffff99
lea ecx, [ebp - 0x20]
mov edx, dword [ebx + 0x20]
mov eax, ebx
call fcn.004013cf
test eax, eax
je 0x402076
or esi, 0xffffffff
lea ecx, [ebp - 0x24]
mov edx, dword [ebx + 0x20]
mov eax, ebx
call fcn.004013cf
test eax, eax
je 0x40208a
or esi, 0xffffffff
lea ecx, [ebp - 0x20]
mov edx, dword [ebx + 0x20]
mov eax, ebx
call fcn.004013cf
test eax, eax
je 0x4020a0
or esi, 0xffffffff
jmp 0x4020bb
test esi, esi
jne 0x4020bb
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebx + 0x54]
jne 0x4020b6
jmp 0x402452
cmp eax, 8
je 0x4020bb
mov esi, 0xffffff99
lea ecx, [ebp - 0x20]
mov edx, dword [ebx + 0x20]
mov eax, ebx
call fcn.0040141b
test eax, eax
je 0x4020cf
or esi, 0xffffffff
lea ecx, [ebp - 0x20]
mov edx, dword [ebx + 0x20]
mov eax, ebx
call fcn.0040141b
test eax, eax
je 0x4020e5
or esi, 0xffffffff
jmp 0x4020fc
test esi, esi
jne 0x4020fc
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebx + 0x5c]
je 0x4020fc
test byte [ebp - 0x24], 8
jne 0x4020fc
mov esi, 0xffffff99
lea ecx, [ebp - 0x20]
mov edx, dword [ebx + 0x20]
mov eax, ebx
call fcn.0040141b
test eax, eax
je 0x402112
or esi, 0xffffffff
jmp 0x402129
test esi, esi
jne 0x402129
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebx + 0x60]
je 0x402129
test byte [ebp - 0x24], 8
jne 0x402129
mov esi, 0xffffff99
lea ecx, [ebp - 0x20]
mov edx, dword [ebx + 0x20]
mov eax, ebx
call fcn.0040141b
test eax, eax
je 0x40213f
or esi, 0xffffffff
jmp 0x402156
test esi, esi
jne 0x402156
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebx + 0x64]
je 0x402156
test byte [ebp - 0x24], 8
jne 0x402156
mov esi, 0xffffff99
lea ecx, [ebp - 0x28]
mov edx, dword [ebx + 0x20]
mov eax, ebx
call fcn.004013cf
test eax, eax
je 0x40216c
or esi, 0xffffffff
jmp 0x40217d
test esi, esi
jne 0x40217d
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebx + 0x68]
je 0x40217d
mov esi, 0xffffff99
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x48], eax
mov edx, dword [ebx + 0x20]
mov eax, ebx
call fcn.004013cf
test eax, eax
je 0x402197
or esi, 0xffffffff
mov edx, dword [ebx + 0x98]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], eax
test esi, esi
jne 0x40243e
mov dword [esp], 0x90
call sub.msvcrt.dll_malloc
test eax, eax
je 0x402445
mov dword [esp], 0x4000
mov dword [ebp - 0x4c], eax
call sub.msvcrt.dll_malloc
mov esi, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x4c]
test eax, eax
lea ecx, [esi + ecx + 0x1e]
mov esi, dword [ebp - 0x3c]
mov dword [edx + 0x44], ecx
mov ecx, dword [ebp + 0x14]
mov dword [edx], eax
mov dword [edx + 0x48], esi
mov dword [edx + 0x4c], 0
mov dword [edx + 0x8c], ecx
jne 0x402210
mov dword [esp], edx
call fcn.005770f0
jmp 0x402445
mov dword [edx + 0x40], 0
cmp dword [ebp + 0xc], 0
je 0x402225
mov esi, dword [ebp + 0xc]
mov eax, dword [ebx + 0x54]
mov dword [esi], eax
test edi, edi
je 0x40225c
mov eax, dword [ebx + 0x50]
mov dword [edi], 6
and eax, 6
cmp eax, 4
je 0x40224e
cmp eax, 6
je 0x402246
cmp eax, 2
jne 0x40225c
jmp 0x402256
mov dword [edi], 1
jmp 0x40225c
mov dword [edi], 2
jmp 0x40225c
mov dword [edi], 9
mov eax, dword [ebx + 0x5c]
mov dword [edx + 0x50], 0
mov dword [edx + 0x54], eax
lea edi, [edx + 0x60]
mov eax, dword [ebx + 0x54]
mov ecx, 8
mov dword [edx + 0x84], eax
mov eax, dword [ebx + 0x20]
mov dword [edx + 0x80], eax
mov esi, ebx
mov eax, dword [ebx + 0x2c]
mov dword [edx + 0x18], 0
rep movsd dword es:[edi], dword [esi]
mov dword [edx + 0x88], eax
cmp dword [ebp + 0x14], 0
jne 0x40230f
cmp dword [ebx + 0x54], 8
jne 0x40230f
mov dword [edx + 0x24], 0
mov dword [edx + 0x28], 0
mov dword [edx + 0x2c], 0
mov dword [edx + 4], 0
mov dword [edx + 8], 0
lea eax, [edx + 4]
mov dword [ebp - 0x4c], edx
mov dword [esp + 0xc], 0x38
mov dword [esp + 8], 0x63c000
mov dword [esp + 4], 0xfffffff1
mov dword [esp], eax
call fcn.0055d4e3
mov edx, dword [ebp - 0x4c]
test eax, eax
jne 0x4022fc
mov dword [edx + 0x40], 1
jmp 0x40230f
mov dword [ebp - 0x4c], eax
mov dword [esp], edx
call fcn.005770f0
mov eax, dword [ebp - 0x4c]
jmp 0x40244a
mov eax, dword [ebx + 0x60]
mov ecx, dword [ebp - 0x3c]
mov dword [edx + 0x58], eax
mov dword [edx + 8], 0
mov eax, dword [ebx + 0x64]
mov dword [ebx + 0x9c], edx
mov dword [edx + 0x5c], eax
mov eax, dword [ebp - 0x48]
add eax, dword [ebx + 0x98]
lea eax, [ecx + eax + 0x1e]
mov dword [edx + 0x3c], eax
xor eax, eax
cmp dword [ebp + 0x18], 0
je 0x40244a
call fcn.0055ed10
lea edi, [ebx + 0xa4]
mov esi, eax
mov dword [ebx + 0xb0], eax
lea eax, [ebx + 0xac]
mov dword [ebx + 0xa4], 0x12345678
mov dword [ebp - 0x3c], eax
mov dword [edi + 4], 0x23456789
mov dword [ebx + 0xac], 0x34567890
jmp 0x40238f
movsx ecx, cl
mov edx, esi
mov eax, edi
call fcn.00401330
inc dword [ebp + 0x18]
mov edx, dword [ebp + 0x18]
mov cl, byte [edx]
test cl, cl
jne 0x402380
mov edx, dword [ebx + 0x9c]
mov dword [esp + 0xc], 0
mov eax, dword [edx + 0x88]
add eax, dword [edx + 0x3c]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call dword [ebx + 0x10]
test eax, eax
jne 0x402445
lea esi, [ebp - 0x38]
mov dword [esp + 0xc], 0xc
mov dword [esp + 8], esi
mov eax, dword [ebx + 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call dword [ebx + 4]
cmp eax, 0xb
jbe 0x402445
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp - 0x3c]
movzx eax, word [edx]
or eax, 2
mov ecx, eax
xor ecx, 1
imul ecx, eax
movzx ecx, ch
xor cl, byte [esi]
mov eax, edi
mov byte [esi], cl
inc esi
movsx ecx, cl
mov edx, dword [ebx + 0xb0]
call fcn.00401330
cmp esi, dword [ebp - 0x5c]
jne 0x4023f1
mov eax, dword [ebx + 0x9c]
mov dword [ebx + 0xa0], 1
add dword [eax + 0x3c], 0xc
xor eax, eax
jmp 0x40244a
mov eax, 0xffffff9a
jmp 0x40244a
mov eax, 0xffffff99
jmp 0x40244a
mov eax, 0xffffff98
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
test eax, eax
jne 0x4020b1
jmp 0x4020bb