Function at 0x403a50
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x659e12
mov eax, dword fs:[0]
push eax
sub esp, 0x6d0
mov eax, dword [0x7d9a88]
xor eax, esp
mov dword [esp + 0x6c8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x7d9a88]
xor eax, esp
push eax
lea eax, [esp + 0x6e4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x6f4]
xor ebp, ebp
mov dword [esp + 0x24], eax
mov ebx, ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], 0x55555555
call fcn.004044c0
mov ecx, dword [0x8211a4]
mov dword [ecx + 0x64f8], eax
lea ecx, [esp + 0x5c]
call fcn.005652b0
mov dword [esp + 0x6ec], ebp
mov edx, dword [str.open_cs2]
mov eax, dword [0x6c2228]
mov cl, byte [0x6c222c]
push str.KEY_CODE
push 0x6c223c
push ebx
mov dword [esp + 0xd8], edx
mov dword [esp + 0xdc], eax
mov byte [esp + 0xe0], cl
call dword [0x65b0a8]
mov esi, eax
cmp esi, ebp
je 0x403b78
push esi
push ebx
call dword [0x65b0e0]
mov edi, eax
cmp edi, ebp
je 0x403b78
push esi
push ebx
call dword [0x65b144]
mov esi, eax
cmp esi, ebp
je 0x403b71
push edi
call dword [0x65b148]
cmp eax, ebp
je 0x403b71
cmp esi, 0x200
ja 0x403b71
xor ecx, ecx
cmp esi, ebp
jbe 0x403b69
mov ebp, eax
lea edx, [esp + 0xcc]
sub ebp, edx
jmp 0x403b50
lea eax, [ecx + ebp]
mov dl, byte [esp + eax + 0xcc]
xor dl, 0xcd
mov byte [esp + ecx + 0xcc], dl
inc ecx
cmp ecx, esi
jb 0x403b50
mov byte [esp + ecx + 0xcc], 0
push edi
call dword [0x65b0a4]
lea eax, [esp + 0xcc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403b82
sub eax, edx
push eax
lea eax, [esp + 0xd0]
push eax
lea ecx, [esp + 0x64]
call fcn.00565300
push 0x6c227c
push 0x6c2248
push ebx
call dword [0x65b0a8]
mov esi, eax
test esi, esi
je 0x403d2c
push esi
push ebx
call dword [0x65b0e0]
mov edi, eax
test edi, edi
jne 0x403bf3
push eax
push 0x6c2030
push 0x6c2284
push eax
call dword [0x65b358]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], 0xffffffff
call fcn.00565b40
xor eax, eax
jmp 0x404255
push esi
push ebx
call dword [0x65b144]
mov ebp, eax
test ebp, ebp
jne 0x403c1c
push eax
push 0x6c2030
push 0x6c22b0
push eax
call dword [0x65b358]
push edi
call dword [0x65b0a4]
jmp 0x403bd8
push edi
call dword [0x65b148]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x403c46
push eax
push 0x6c2030
push 0x6c2250
push eax
call dword [0x65b358]
push edi
call dword [0x65b0a4]
jmp 0x403bd8
lea esi, [ebp + 8]
push esi
call fcn.0056bdbf
push esi
push eax
mov dword [esp + 0x2c], eax
call fcn.0050cd20
mov ecx, dword [esp + 0x28]
add esp, 0xc
push ebp
mov ebp, dword [esp + 0x24]
push ecx
push ebp
lea ecx, [esp + 0x68]
call fcn.005653d0
push edi
call dword [0x65b0a4]
mov eax, dword [0x8211a4]
cmp dword [eax + 0x64f8], 0
jne 0x403cf8
mov ecx, ebp
add eax, 2
jmp 0x403c90
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x403cb3
test dl, dl
je 0x403cac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x403cb3
add eax, 2
add ecx, 2
test dl, dl
jne 0x403c90
xor eax, eax
or esi, 0xffffffff
jmp 0x403cbc
sbb eax, eax
mov esi, 0xffffffff
sbb eax, esi
test eax, eax
je 0x403cfd
push 0
push 0x6c2030
push 0x6c22e4
push 0
call dword [0x65b358]
mov edx, dword [esp + 0x20]
push edx
call fcn.005aecc5
add esp, 4
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], esi
call fcn.00565b40
xor eax, eax
jmp 0x404255
or esi, 0xffffffff
jmp 0x403d01
mov ebp, dword [esp + 0x20]
push ebp
call fcn.005aecc5
mov ecx, dword [0x8211a4]
lea eax, [ecx + 2]
lea edx, [ecx + 0x106]
add esp, 4
sub edx, eax
jmp 0x403d20
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403d20
jmp 0x403d2f
or esi, 0xffffffff
push str.V_CODE2
push 0x6c2248
push ebx
call dword [0x65b0a8]
mov ebp, eax
test ebp, ebp
je 0x403e2e
push ebp
push ebx
call dword [0x65b0e0]
mov edi, eax
test edi, edi
jne 0x403d81
push eax
push 0x6c2030
push 0x6c2284
push eax
call dword [0x65b358]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], esi
call fcn.00565b40
xor eax, eax
jmp 0x404255
push ebp
push ebx
call dword [0x65b144]
mov ebp, eax
test ebp, ebp
jne 0x403dc0
push eax
push 0x6c2030
push 0x6c22b0
push 0
call dword [0x65b358]
push edi
call dword [0x65b0a4]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], esi
call fcn.00565b40
xor eax, eax
jmp 0x404255
push edi
call dword [0x65b148]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x403ddc
push eax
push 0x6c2030
push 0x6c2250
jmp 0x403d9a
lea ebx, [ebp + 8]
push ebx
call fcn.0056bdbf
mov esi, eax
push ebx
push esi
call fcn.0050cd20
mov eax, dword [esp + 0x28]
add esp, 0xc
push ebp
push eax
push esi
lea ecx, [esp + 0x68]
call fcn.005653d0
push edi
call dword [0x65b0a4]
mov edx, dword [0x8211a4]
add edx, 0x106
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403e18
push esi
call fcn.005aecc5
add esp, 4
or esi, 0xffffffff
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], esi
call fcn.00565b40
mov ecx, dword [0x8211a4]
cmp dword [ecx + 0x6ba4], 0
je 0x403eb0
lea ecx, [esp + 0x5c]
call fcn.005652b0
mov dword [esp + 0x6ec], 1
mov edx, dword [0x8211a4]
add edx, 2
push edx
lea ecx, [esp + 0x60]
mov dword [esp + 0x1c], 0
call fcn.00565890
push 0
lea ecx, [esp + 0x1c]
push ecx
push eax
push str.direct.dat
lea ecx, [esp + 0x6c]
mov dword [esp + 0x24], eax
call fcn.00565420
lea ecx, [esp + 0x5c]
mov ebx, eax
mov dword [esp + 0x6ec], esi
call fcn.00565b40
test ebx, ebx
jne 0x403f31
lea ecx, [esp + 0x5c]
call fcn.005652b0
mov dword [esp + 0x6ec], 2
mov eax, dword [0x8211a4]
mov edx, dword [esp + 0x14]
add eax, 2
push eax
lea ecx, [esp + 0x60]
mov dword [esp + 0x1c], edx
call fcn.00565890
push 1
lea ecx, [esp + 0x1c]
push ecx
push eax
push str.key.dat
lea ecx, [esp + 0x6c]
call fcn.00565420
test eax, eax
jne 0x403f21
push eax
push str.Boot_Error
push 0x6c2328
push eax
call dword [0x65b358]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], esi
call fcn.00565b40
xor eax, eax
jmp 0x404255
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], esi
call fcn.00565b40
call fcn.004043e0
test eax, eax
je 0x403f55
push 0
push str.Boot_Error
push str.CD_DVD_ROM
push 0
call dword [0x65b358]
xor eax, eax
jmp 0x404255
call fcn.00525570
test eax, eax
je 0x403bec
cmp dword [0x841c40], 0
jne 0x403f8c
push 0x27
push str.e:prg_vs2008kclib_dx9include..kcClassBasekcClassBase.h
push 0x6cc
call fcn.0051ee10
add esp, 0xc
test eax, eax
je 0x403f8c
push 1
mov ecx, eax
call fcn.005025c0
mov eax, dword [0x8211a4]
cmp dword [eax + 0x7690], 0
je 0x403fdd
lea edx, [eax + 0x6c2c]
push edx
add eax, 0x860
push eax
lea eax, [esp + 0x2d4]
push 2
push eax
call fcn.0050c120
lea ecx, [esp + 0x2dc]
push 1
push ecx
call fcn.0050ca60
mov ecx, dword [0x841c1c]
add esp, 0x18
push 0
lea edx, [esp + 0x2d0]
push edx
call fcn.004fdc40
push 0x27
push str.e:prg_vs2008kclib_dx9include..kcClassBasekcClassBase.h
push 4
call fcn.0051ee10
add esp, 0xc
test eax, eax
je 0x40400d
mov edx, dword [0x8211a4]
lea ecx, [esp + 0x28]
push ecx
add edx, 0x440
push edx
mov ecx, eax
call fcn.004c0450
jmp 0x40400f
xor eax, eax
cmp dword [esp + 0x28], 0
mov edi, dword [esp + 0x24]
mov dword [edi + 0x1c], eax
je 0x404031
push 0x6c23b8
call fcn.005127b0
add esp, 4
xor eax, eax
jmp 0x404255
mov eax, dword [0x8211a4]
mov dword [edi + 0x20], 0
cmp byte [eax + 0x611c], 0
je 0x404140
lea ecx, [esp + 0x14]
call fcn.004c04a0
mov dword [esp + 0x6ec], 3
xor edi, edi
mov bl, 0x41
push edi
lea ecx, [esp + 0x18]
call fcn.004c05a0
cmp eax, 3
jne 0x4040ec
lea ecx, [esp + 0xcc]
call fcn.005184a0
movsx ecx, bl
push ecx
lea edx, [esp + 0x2d0]
push 0x6c23e4
push edx
mov byte [esp + 0x6f8], 4
call fcn.005ae775
mov eax, dword [0x8211a4]
add eax, 0x611c
push eax
lea ecx, [esp + 0x2dc]
push ecx
lea edx, [esp + 0x3e8]
push 2
push edx
call fcn.0050c120
add esp, 0x1c
lea eax, [esp + 0x3d4]
push eax
lea ecx, [esp + 0xd0]
call fcn.00518a90
cmp eax, esi
jne 0x4040fa
lea ecx, [esp + 0xcc]
mov byte [esp + 0x6ec], 3
call fcn.00518a70
inc bl
inc edi
cmp bl, 0x5a
jle 0x404062
jmp 0x40412c
mov edx, dword [0x8211a4]
movsx ecx, bl
push ecx
add edx, 0x6018
push str._c:_
push edx
call fcn.005ae775
add esp, 0xc
lea ecx, [esp + 0xcc]
mov byte [esp + 0x6ec], 3
call fcn.00518a70
lea ecx, [esp + 0x14]
mov dword [esp + 0x6ec], esi
call fcn.004057b0
mov edi, dword [esp + 0x24]
mov ecx, dword [0x841c1c]
lea eax, [esp + 0x2c]
push eax
mov dword [edi + 0x2c], 0
call fcn.004fba20
mov eax, dword [esp + 0x34]
cmp eax, 0x10
je 0x404238
cmp eax, 0x20
je 0x404238
mov ebx, dword [0x65b358]
push 4
push 0x6c23f0
push 0x6c2408
push 0
call ebx
cmp eax, 7
je 0x403bec
mov ecx, dword [0x8211a4]
mov dword [edi + 0x2c], 1
cmp dword [ecx + 0x78a8], esi
jne 0x404238
push esi
push 0
push 0
lea ecx, [esp + 0x44]
call fcn.0042d880
mov dword [esp + 0x6ec], 5
mov eax, dword [0x8211a4]
movzx edx, word [eax + 0x7642]
movzx eax, word [eax + 0x7640]
push 0x20
push edx
push eax
lea ecx, [esp + 0x44]
call fcn.0042d260
test eax, eax
je 0x4041f4
mov ecx, dword [0x8211a4]
mov dword [ecx + 0x78a8], 0x20
jmp 0x404228
mov eax, dword [0x8211a4]
movzx edx, word [eax + 0x7642]
movzx eax, word [eax + 0x7640]
push 0x10
push edx
push eax
lea ecx, [esp + 0x44]
call fcn.0042d260
test eax, eax
je 0x40427d
mov ecx, dword [0x8211a4]
mov dword [ecx + 0x78a8], 0x10
lea ecx, [esp + 0x38]
mov dword [esp + 0x6ec], esi
call fcn.0042d920
mov ax, word [esp + 0x2c]
mov cx, word [esp + 0x30]
mov word [edi + 0xb270], ax
mov word [edi + 0xb272], cx
mov eax, 1
mov ecx, dword [esp + 0x6e4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c8]
xor ecx, esp
call fcn.005ae766
add esp, 0x6dc
ret
mov eax, dword [0x8211a4]
movzx edx, word [eax + 0x7642]
movzx eax, word [eax + 0x7640]
push edx
push eax
lea ecx, [esp + 0x4e4]
push 0x6c2468
push ecx
call fcn.005ae775
add esp, 0x10
push 0
push 0x6c24a4
lea edx, [esp + 0x4e4]
push edx
push 0
call ebx
lea ecx, [esp + 0x38]
mov dword [esp + 0x6ec], esi
call fcn.0042d920
xor eax, eax
jmp 0x404255