Function at 0x40ba60
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x3c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x34], eax
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x2c], 0
mov esi, 2
mov dword [esp + 0x1c], 0
mov dword [esp + 0x30], esi
mov ecx, dword [edi + 4]
movzx eax, byte [ecx + 0x1258]
mov byte [esp + 0x34], al
mov al, byte [ecx + 0x1259]
movzx ebp, al
shr ebp, 1
and ebp, 1
mov byte [esp + 0x35], al
xor ebx, ebx
nop
mov ecx, dword [edi + 4]
lea edx, [esp + 0x14]
push 8
mov ecx, dword [ecx + 0x2c]
call fcn.0040dc20
add esp, 4
test eax, eax
je 0x40c1aa
mov eax, dword [esp + 0x14]
cmp eax, 0xff
je 0x40c144
mov ecx, dword [esp + 0x30]
inc esi
inc ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x30], esi
mov byte [esp + ecx + 0x34], al
cmp ebx, 2
jb 0x40bab0
movzx esi, byte [esp + 0x36]
mov ecx, esi
shr ecx, 4
cmp ecx, 0xf
ja case.default.0x40bb0a
movzx eax, byte [ecx + 0x40c1d4]
mov ebx, ebp
jmp dword [eax*4 + 0x40c1c0]
mov ebp, 1
jmp case.default.0x40bb0a
mov eax, dword [edi + 4]
mov dword [eax + 0x468], 0xc0
jmp case.default.0x40bb0a
add ecx, 0xfffffffe
mov edx, 0x240
jmp 0x40bb3f
mov dword [esp + 0x2c], ecx
jmp case.default.0x40bb0a
add ecx, 0xfffffff8
mov edx, 0x100
mov eax, dword [edi + 4]
shl edx, cl
mov dword [eax + 0x468], edx
and esi, 0xf
cmp esi, 0xf
ja case.default.0x40bb56
jmp dword [esi*4 + 0x40c1e4]
mov ecx, dword [edi + 4]
cmp dword [ecx + 0xf0], 0
je 0x40bb7a
mov eax, dword [ecx + 0x118]
mov dword [ecx + 0x46c], eax
jmp case.default.0x40bb56
mov ebp, 1
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0x15888
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0x2b110
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0x2ee00
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0x1f40
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0x3e80
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0x5622
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0x5dc0
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0x7d00
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0xac44
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0xbb80
jmp case.default.0x40bb56
mov eax, dword [edi + 4]
mov dword [eax + 0x46c], 0x17700
jmp case.default.0x40bb56
mov dword [esp + 0x1c], esi
mov bl, byte [esp + 0x37]
mov edx, dword [edi + 4]
movzx ecx, bl
mov eax, ecx
shr eax, 4
test al, 8
je 0x40bc96
and eax, 7
mov dword [edx + 0x470], 2
sub eax, 0
je 0x40bc87
sub eax, 1
je 0x40bc78
sub eax, 1
je 0x40bc69
mov ebp, 1
jmp 0x40bcaa
mov eax, dword [edi + 4]
mov dword [eax + 0x474], 3
jmp 0x40bcaa
mov eax, dword [edi + 4]
mov dword [eax + 0x474], 2
jmp 0x40bcaa
mov eax, dword [edi + 4]
mov dword [eax + 0x474], 1
jmp 0x40bcaa
inc eax
mov dword [edx + 0x470], eax
mov eax, dword [edi + 4]
mov dword [eax + 0x474], 0
shr ecx, 1
and ecx, 7
mov dword [esp + 0x14], ecx
cmp ecx, 7
ja case.default.0x40bcbc
jmp dword [ecx*4 + 0x40c224]
mov ecx, dword [edi + 4]
cmp dword [ecx + 0xf0], 0
je case.0x40bcbc.3
mov eax, dword [ecx + 0x120]
mov dword [ecx + 0x478], eax
jmp case.default.0x40bcbc
mov ebp, 1
jmp case.default.0x40bcbc
mov eax, dword [edi + 4]
mov dword [eax + 0x478], 8
jmp case.default.0x40bcbc
mov eax, dword [edi + 4]
mov dword [eax + 0x478], 0xc
jmp case.default.0x40bcbc
mov eax, dword [edi + 4]
mov dword [eax + 0x478], 0x10
jmp case.default.0x40bcbc
mov eax, dword [edi + 4]
mov dword [eax + 0x478], 0x14
jmp case.default.0x40bcbc
mov eax, dword [edi + 4]
mov dword [eax + 0x478], 0x18
jmp case.default.0x40bcbc
mov eax, dword [edi + 4]
mov dword [eax + 0x478], 0x20
test bl, 1
mov ebx, 1
cmovne ebp, ebx
test byte [esp + 0x35], bl
jne 0x40be13
mov ecx, dword [edi + 4]
cmp dword [ecx + 0xf0], 0
je 0x40bd6f
mov eax, dword [ecx + 0x108]
cmp eax, dword [ecx + 0x10c]
jne 0x40be13
mov ecx, dword [ecx + 0x2c]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x38]
push eax
lea edx, [esp + 0x1c]
call fcn.0040e760
add esp, 8
test eax, eax
je 0x40c1aa
mov edx, dword [esp + 0x14]
mov ecx, dword [edi + 4]
cmp edx, 0xffffffff
jne 0x40bdfb
mov eax, dword [esp + 0x18]
mov al, byte [esp + eax + 0x33]
mov byte [ecx + 0x125a], al
mov eax, dword [edi + 4]
mov dword [eax + 0x1218], ebx
mov eax, dword [edi + 4]
cmp dword [eax + 0x1284], 0
jne 0x40bdde
mov dword [eax + 0x20d4], ebx
mov esi, dword [edi + 4]
push dword [esi + 0x24]
mov esi, dword [esi + 0x20]
mov ecx, esi
push 1
push edi
call dword [0x48013c]
call esi
add esp, 0xc
mov ecx, dword [edi]
mov eax, ebx
mov dword [ecx], 2
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00457d6e
add esp, 0x3c
ret
mov dword [ecx + 0x47c], 0
mov eax, dword [edi + 4]
mov dword [eax + 0x480], edx
jmp 0x40bebf
mov ecx, dword [edi + 4]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x38]
push eax
mov ecx, dword [ecx + 0x2c]
lea edx, [esp + 0x28]
call fcn.0040e890
add esp, 8
test eax, eax
je 0x40c1aa
mov edx, dword [esp + 0x20]
mov eax, edx
mov esi, dword [esp + 0x24]
and eax, esi
mov ecx, dword [edi + 4]
cmp eax, 0xffffffff
jne 0x40beaa
mov eax, dword [esp + 0x18]
mov al, byte [esp + eax + 0x33]
mov byte [ecx + 0x125a], al
mov eax, dword [edi + 4]
mov dword [eax + 0x1218], ebx
mov eax, dword [edi + 4]
cmp dword [eax + 0x1284], 0
jne 0x40be8d
mov dword [eax + 0x20d4], ebx
mov esi, dword [edi + 4]
push dword [esi + 0x24]
mov esi, dword [esi + 0x20]
mov ecx, esi
push 1
push edi
call dword [0x48013c]
call esi
add esp, 0xc
mov eax, dword [edi]
mov dword [eax], 2
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00457d6e
add esp, 0x3c
ret
mov dword [ecx + 0x47c], ebx
mov eax, dword [edi + 4]
mov dword [eax + 0x480], edx
mov dword [eax + 0x484], esi
cmp dword [esp + 0x2c], 0
je 0x40bf5a
mov ecx, dword [edi + 4]
lea edx, [esp + 0x14]
push 8
mov ecx, dword [ecx + 0x2c]
call fcn.0040dc20
add esp, 4
test eax, eax
je 0x40c1aa
cmp dword [esp + 0x2c], 7
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
lea esi, [eax + 1]
mov byte [esp + eax + 0x34], bl
mov edx, esi
jne 0x40bf30
mov ecx, dword [edi + 4]
lea edx, [esp + 0x20]
push 8
mov ecx, dword [ecx + 0x2c]
call fcn.0040dc20
add esp, 4
test eax, eax
je 0x40c1aa
mov eax, dword [esp + 0x20]
lea edx, [esi + 1]
shl ebx, 8
or ebx, eax
mov byte [esp + esi + 0x34], al
mov esi, edx
mov dword [esp + 0x14], ebx
mov eax, dword [edi + 4]
lea ecx, [ebx + 1]
mov dword [eax + 0x468], ecx
mov ecx, dword [edi + 4]
cmp dword [ecx + 0x468], 0xffff
jbe 0x40bf5e
mov al, byte [esp + edx + 0x33]
mov byte [ecx + 0x125a], al
jmp 0x40c14e
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x1c], 0
je 0x40bff1
mov ecx, dword [edi + 4]
lea edx, [esp + 0x14]
push 8
mov ecx, dword [ecx + 0x2c]
call fcn.0040dc20
add esp, 4
test eax, eax
je 0x40c1aa
mov ebx, dword [esp + 0x14]
mov byte [esp + esi + 0x34], bl
inc esi
cmp dword [esp + 0x1c], 0xc
je 0x40bfe2
mov ecx, dword [edi + 4]
lea edx, [esp + 0x20]
push 8
mov ecx, dword [ecx + 0x2c]
call fcn.0040dc20
add esp, 4
test eax, eax
je 0x40c1aa
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 4]
shl ebx, 8
mov byte [esp + esi + 0x34], al
or ebx, eax
inc esi
mov dword [esp + 0x14], ebx
cmp dword [esp + 0x1c], 0xd
jne 0x40bfd5
mov dword [ecx + 0x46c], ebx
jmp 0x40bff1
lea eax, [ebx + ebx*4]
add eax, eax
mov dword [ecx + 0x46c], eax
jmp 0x40bff1
mov eax, dword [edi + 4]
imul ecx, ebx, 0x3e8
mov dword [eax + 0x46c], ecx
mov ecx, dword [edi + 4]
lea edx, [esp + 0x14]
push 8
mov ecx, dword [ecx + 0x2c]
call fcn.0040dc20
add esp, 4
test eax, eax
je 0x40c1aa
xor al, al
lea edx, [esp + 0x34]
test esi, esi
je 0x40c02d
movzx ecx, byte [edx]
lea edx, [edx + 1]
movzx eax, al
xor ecx, eax
mov al, byte [ecx + 0x48c080]
sub esi, 1
jne 0x40c017
mov ecx, dword [edi + 4]
cmp al, byte [esp + 0x14]
je 0x40c052
cmp dword [ecx + 0x1284], 0
jne 0x40c18a
mov dword [ecx + 0x20d4], 1
jmp 0x40c171
mov dword [ecx + 0xe4], 0
mov ecx, dword [edi + 4]
cmp dword [ecx + 0x47c], 0
jne 0x40c0f6
mov eax, dword [ecx + 0x480]
mov dword [ecx + 0x47c], 1
mov ecx, dword [edi + 4]
mov edx, dword [ecx + 0xe0]
test edx, edx
je 0x40c08d
mul edx
jmp 0x40c0ea
cmp dword [ecx + 0xf0], 0
je 0x40c0c3
mov edx, dword [ecx + 0x108]
cmp edx, dword [ecx + 0x10c]
jne 0x40c0fe
mul edx
mov dword [ecx + 0x480], eax
mov dword [ecx + 0x484], edx
mov ecx, dword [edi + 4]
mov eax, dword [ecx + 0x10c]
mov dword [ecx + 0xe4], eax
jmp 0x40c0f6
test eax, eax
jne 0x40c0e4
mov dword [ecx + 0x480], eax
mov dword [ecx + 0x484], eax
mov ecx, dword [edi + 4]
mov eax, dword [ecx + 0x468]
mov dword [ecx + 0xe4], eax
jmp 0x40c0f6
mul dword [ecx + 0x468]
mov dword [ecx + 0x480], eax
mov dword [ecx + 0x484], edx
test ebp, ebp
je 0x40c192
mov eax, dword [edi + 4]
cmp dword [eax + 0x1284], 0
jne 0x40c11e
mov dword [eax + 0x20d4], 1
mov esi, dword [edi + 4]
push dword [esi + 0x24]
push 3
jmp 0x40c179
inc dword [eax + 0x20c8]
mov eax, dword [edi]
mov dword [eax], 2
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00457d6e
add esp, 0x3c
ret
mov eax, dword [edi + 4]
mov byte [eax + 0x125a], 0xff
mov eax, dword [edi + 4]
mov dword [eax + 0x1218], 1
mov eax, dword [edi + 4]
cmp dword [eax + 0x1284], 0
jne 0x40c18a
mov dword [eax + 0x20d4], 1
mov esi, dword [edi + 4]
push dword [esi + 0x24]
push 1
mov esi, dword [esi + 0x20]
mov ecx, esi
push edi
call dword [0x48013c]
call esi
add esp, 0xc
mov eax, dword [edi]
mov dword [eax], 2
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00457d6e
add esp, 0x3c
ret
mov ecx, dword [esp + 0x44]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00457d6e
add esp, 0x3c
ret