Function at 0x403080
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x605fb2
mov eax, dword fs:[0]
push eax
sub esp, 0x6d0
mov eax, dword [0x7664f8]
xor eax, esp
mov dword [esp + 0x6c8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x7664f8]
xor eax, esp
push eax
lea eax, [esp + 0x6e4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x6f4]
mov edi, ecx
xor ebp, ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], 0x55555555
call fcn.00403a90
mov ecx, dword [0x7ae284]
mov dword [ecx + 0x4fb4], eax
lea ecx, [esp + 0x5c]
call fcn.00554060
mov dword [esp + 0x6ec], ebp
mov edx, dword [str.windmill]
mov eax, dword [0x656e3c]
mov cl, byte [0x656e40]
mov ebx, dword [0x6070a8]
push str.KEY_CODE
push 0x656e50
push edi
mov dword [esp + 0xd8], edx
mov dword [esp + 0xdc], eax
mov byte [esp + 0xe0], cl
call ebx
mov esi, eax
cmp esi, ebp
je 0x4031a8
push esi
push edi
call dword [0x6070cc]
mov ebp, eax
test ebp, ebp
je 0x4031a8
push esi
push edi
call dword [0x607124]
mov esi, eax
test esi, esi
je 0x4031a1
push ebp
call dword [0x607128]
test eax, eax
je 0x4031a1
cmp esi, 0x200
ja 0x4031a1
xor ecx, ecx
test esi, esi
jbe 0x403199
lea edx, [esp + 0xcc]
sub eax, edx
jmp 0x403180
lea edx, [eax + ecx]
mov dl, byte [esp + edx + 0xcc]
xor dl, 0xcd
mov byte [esp + ecx + 0xcc], dl
inc ecx
cmp ecx, esi
jb 0x403180
mov byte [esp + ecx + 0xcc], 0
push ebp
call dword [0x6070a4]
lea eax, [esp + 0xcc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4031b2
sub eax, edx
push eax
lea eax, [esp + 0xd0]
push eax
lea ecx, [esp + 0x64]
call fcn.005540b0
push 0x656e54
push 0x656e5c
push edi
call ebx
mov esi, eax
test esi, esi
je 0x40332f
mov ebx, dword [esp + 0x1c]
push esi
push ebx
call dword [0x6070cc]
mov edi, eax
test edi, edi
jne 0x403223
push eax
push 0x656cd0
push 0x656e64
push eax
call dword [0x60734c]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], 0xffffffff
call fcn.005548f0
xor eax, eax
jmp 0x403986
push esi
push ebx
call dword [0x607124]
mov ebp, eax
test ebp, ebp
jne 0x40324e
push 0
push 0x656cd0
push 0x656e90
push 0
call dword [0x60734c]
push edi
call dword [0x6070a4]
jmp 0x403208
push edi
call dword [0x607128]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40327a
push 0
push 0x656cd0
push 0x656ec4
push 0
call dword [0x60734c]
push edi
call dword [0x6070a4]
jmp 0x403208
lea esi, [ebp + 8]
push esi
call fcn.0055a9ff
mov ebx, eax
push esi
push ebx
call fcn.004ffbf0
mov ecx, dword [esp + 0x20]
add esp, 0xc
push ebp
push ecx
push ebx
lea ecx, [esp + 0x68]
call fcn.00554180
push edi
call dword [0x6070a4]
mov eax, dword [0x7ae284]
cmp dword [eax + 0x4fb4], 0
jne 0x40330b
mov ecx, ebx
add eax, 2
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4032e0
test dl, dl
je 0x4032dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4032e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4032c0
xor eax, eax
jmp 0x4032e5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40330b
push 0
push 0x656cd0
push 0x656ef0
push 0
call dword [0x60734c]
push ebx
call fcn.0055cc01
add esp, 4
jmp 0x403208
push ebx
call fcn.0055cc01
mov ecx, dword [0x7ae284]
lea eax, [ecx + 2]
lea edx, [ecx + 0x106]
add esp, 4
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403325
mov edi, dword [esp + 0x1c]
push str.V_CODE2
push 0x656e5c
push edi
call dword [0x6070a8]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x4033e9
push esi
push edi
call dword [0x6070cc]
mov edi, eax
cmp edi, ebx
jne 0x40336f
push ebx
push 0x656cd0
push 0x656e64
push ebx
jmp 0x403202
mov edx, dword [esp + 0x1c]
push esi
push edx
call dword [0x607124]
mov ebp, eax
test ebp, ebp
je 0x403231
push edi
call dword [0x607128]
mov dword [esp + 0x14], eax
test eax, eax
je 0x40325d
lea ebx, [ebp + 8]
push ebx
call fcn.0055a9ff
mov esi, eax
push ebx
push esi
call fcn.004ffbf0
mov eax, dword [esp + 0x20]
add esp, 0xc
push ebp
push eax
push esi
lea ecx, [esp + 0x68]
call fcn.00554180
push edi
call dword [0x6070a4]
mov edx, dword [0x7ae284]
add edx, 0x106
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4033d4
push esi
call fcn.0055cc01
add esp, 4
xor ebx, ebx
or ebp, 0xffffffff
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], ebp
call fcn.005548f0
mov ecx, dword [0x7ae284]
cmp dword [ecx + 0x565c], ebx
je 0x403468
lea ecx, [esp + 0x5c]
call fcn.00554060
mov dword [esp + 0x6ec], 1
mov edx, dword [0x7ae284]
add edx, 2
push edx
lea ecx, [esp + 0x60]
mov dword [esp + 0x1c], ebx
call fcn.00554640
mov esi, eax
push ebx
lea eax, [esp + 0x1c]
push eax
push esi
push str.direct.dat
lea ecx, [esp + 0x6c]
call fcn.005541d0
lea ecx, [esp + 0x5c]
mov edi, eax
mov dword [esp + 0x6ec], ebp
call fcn.005548f0
cmp edi, ebx
jne 0x403532
jmp 0x40346c
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x5c]
call fcn.00554060
mov dword [esp + 0x6ec], 2
mov ecx, dword [0x7ae284]
add ecx, 2
push ecx
lea ecx, [esp + 0x60]
mov dword [esp + 0x1c], esi
call fcn.00554640
push 1
lea edx, [esp + 0x1c]
push edx
push eax
push str.key.dat
lea ecx, [esp + 0x6c]
call fcn.005541d0
test eax, eax
jne 0x403522
mov eax, dword [0x7ae284]
add eax, 2
push eax
lea ecx, [esp + 0xd0]
push str._s____cs2_common_key____
push ecx
call fcn.0055c6b1
add esp, 0xc
lea edx, [esp + 0xcc]
push edx
lea ecx, [esp + 0x60]
call fcn.00554640
push ebx
lea ecx, [esp + 0x1c]
push ecx
push eax
push str.key_com.dat
lea ecx, [esp + 0x6c]
call fcn.005541d0
test eax, eax
jmp 0x403522
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], ebp
call fcn.005548f0
call fcn.004039b0
test eax, eax
je 0x403554
push ebx
push str.Boot_Error
push str.CD_DVD_ROM
push ebx
call dword [0x60734c]
xor eax, eax
jmp 0x403986
call fcn.00516660
test eax, eax
je 0x40321c
cmp dword [0x7cec08], ebx
jne 0x40358a
push 0x27
push str.e:prg_vs2008kclib_dx9include..kcClassBasekcClassBase.h
push 0x6cc
call fcn.00510640
add esp, 0xc
cmp eax, ebx
je 0x40358a
push 1
mov ecx, eax
call fcn.004f5550
mov eax, dword [0x7ae284]
cmp dword [eax + 0x5738], ebx
je 0x4035d7
push str.info.txt
add eax, 0x85c
push eax
lea edx, [esp + 0x2d4]
push 2
push edx
call fcn.004ff010
lea eax, [esp + 0x2dc]
push 1
push eax
call fcn.004ff8f0
add esp, 0x18
push ebx
lea ecx, [esp + 0x2d0]
push ecx
mov ecx, dword [0x7cebe4]
call fcn.004f1140
push 0x27
push str.e:prg_vs2008kclib_dx9include..kcClassBasekcClassBase.h
push 4
call fcn.00510640
add esp, 0xc
cmp eax, ebx
je 0x403607
mov ecx, dword [0x7ae284]
lea edx, [esp + 0x28]
add ecx, 0x440
push edx
push ecx
mov ecx, eax
call fcn.004b8ab0
jmp 0x403609
xor eax, eax
mov esi, dword [esp + 0x20]
mov dword [esi + 0x1c], eax
cmp dword [esp + 0x28], ebx
je 0x40362a
push 0x656ffc
call fcn.005056c0
add esp, 4
xor eax, eax
jmp 0x403986
mov edx, dword [0x7ae284]
mov dword [esi + 0x20], ebx
cmp byte [edx + 0x4bd8], 0
je 0x403747
lea ecx, [esp + 0x14]
call fcn.004b8b10
mov dword [esp + 0x6ec], 3
xor esi, esi
mov bl, 0x41
jmp 0x403660
push esi
lea ecx, [esp + 0x18]
call fcn.004b8c10
cmp eax, 3
jne 0x4036ed
lea ecx, [esp + 0xcc]
call fcn.00505940
movsx eax, bl
push eax
lea ecx, [esp + 0x2d0]
push 0x657028
push ecx
mov byte [esp + 0x6f8], 4
call fcn.0055c6b1
mov edx, dword [0x7ae284]
add edx, 0x4bd8
push edx
lea eax, [esp + 0x2dc]
push eax
lea ecx, [esp + 0x3e8]
push 2
push ecx
call fcn.004ff010
add esp, 0x1c
lea edx, [esp + 0x3d4]
push edx
lea ecx, [esp + 0xd0]
call fcn.00505f30
cmp eax, 0xffffffff
jne 0x4036fb
lea ecx, [esp + 0xcc]
mov byte [esp + 0x6ec], 3
call fcn.00505f10
inc bl
inc esi
cmp bl, 0x5a
jle 0x403660
jmp 0x40372d
mov ecx, dword [0x7ae284]
movsx eax, bl
push eax
add ecx, 0x4ad4
push str._c:_
push ecx
call fcn.0055c6b1
add esp, 0xc
lea ecx, [esp + 0xcc]
mov byte [esp + 0x6ec], 3
call fcn.00505f10
lea ecx, [esp + 0x14]
mov dword [esp + 0x6ec], 0xffffffff
call fcn.00404cc0
mov esi, dword [esp + 0x20]
xor ebx, ebx
mov ecx, dword [0x7cebe4]
lea edx, [esp + 0x2c]
push edx
or edi, 0xffffffff
mov dword [esi + 0x2c], ebx
call fcn.004ef680
mov eax, dword [esp + 0x34]
mov ebp, dword [0x60734c]
cmp eax, 0x10
je 0x403837
cmp eax, 0x20
je 0x403837
push 4
push 0x657034
push 0x657048
push ebx
call ebp
cmp eax, 7
je 0x40321c
mov eax, dword [0x7ae284]
mov dword [esi + 0x2c], 1
cmp dword [eax + 0x5950], edi
jne 0x403837
push edi
push ebx
push ebx
lea ecx, [esp + 0x44]
call fcn.0042b960
mov dword [esp + 0x6ec], 5
mov eax, dword [0x7ae284]
movzx ecx, word [eax + 0x56ea]
movzx edx, word [eax + 0x56e8]
push 0x20
push ecx
push edx
lea ecx, [esp + 0x44]
call fcn.0042b340
test eax, eax
mov eax, dword [0x7ae284]
je 0x4037f5
mov dword [eax + 0x5950], 0x20
jmp 0x403827
movzx ecx, word [eax + 0x56ea]
movzx edx, word [eax + 0x56e8]
push 0x10
push ecx
push edx
lea ecx, [esp + 0x44]
call fcn.0042b340
test eax, eax
mov eax, dword [0x7ae284]
je 0x4038c1
mov dword [eax + 0x5950], 0x10
lea ecx, [esp + 0x38]
mov dword [esp + 0x6ec], edi
call fcn.0042ba00
cmp dword [esi + 0x2c], ebx
jne 0x403951
mov edi, dword [0x6074f0]
push ebx
call edi
mov ecx, dword [0x7ae284]
movzx edx, word [ecx + 0x56e8]
cmp edx, eax
jg 0x40386f
push 1
call edi
mov ecx, dword [0x7ae284]
movzx edx, word [ecx + 0x56ea]
cmp edx, eax
jl 0x40387b
cmp dword [ecx + 0x56f8], ebx
jne 0x403922
cmp dword [ecx + 0x56e4], ebx
jne 0x403951
mov eax, dword [esp + 0x1c]
push ebx
push 0x404c40
push ebx
push 0x7f
push eax
call dword [0x6074f4]
sub eax, 0x412
je 0x40390b
sub eax, 1
jne 0x403951
mov eax, dword [0x7ae284]
mov dword [eax + 0x5948], ebx
mov dword [eax + 0x594c], ebx
jmp 0x403951
movzx ecx, word [eax + 0x56ea]
movzx edx, word [eax + 0x56e8]
push ecx
push edx
lea eax, [esp + 0x4e4]
push 0x6570a8
push eax
call fcn.0055c6b1
add esp, 0x10
push ebx
push 0x6570e4
lea ecx, [esp + 0x4e4]
push ecx
push ebx
call ebp
lea ecx, [esp + 0x38]
mov dword [esp + 0x6ec], edi
call fcn.0042ba00
xor eax, eax
jmp 0x403986
mov eax, dword [0x7ae284]
mov dword [eax + 0x5948], ebx
mov dword [eax + 0x594c], 1
jmp 0x403951
mov dword [esi + 0x2c], 1
mov eax, dword [ecx + 0x5948]
cmp eax, 1
je 0x403951
cmp dword [ecx + 0x594c], ebx
je 0x403941
cmp eax, 2
jne 0x403951
push ebx
add ecx, 0x33c
push ecx
push 0x6570f8
push ebx
call ebp
xor ecx, ecx
cmp dword [esi + 0x2c], ebx
sete cl
push ecx
mov ecx, dword [0x7ae280]
call fcn.00426880
mov edx, dword [0x7ae284]
mov dword [edx + 0x56e4], 1
push esi
mov dword [esi + 0x5c], ebx
call fcn.00401660
add esp, 4
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.0055c6a2
add esp, 0x6dc
ret