Function at 0x403080
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x606cd2
mov eax, dword fs:[0]
push eax
sub esp, 0x6d0
mov eax, dword [0x767500]
xor eax, esp
mov dword [esp + 0x6c8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x767500]
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 [0x7af284]
mov dword [ecx + 0x64f4], eax
lea ecx, [esp + 0x5c]
call fcn.00554e90
mov dword [esp + 0x6ec], ebp
mov edx, dword [str.windmill]
mov eax, dword [0x657ebc]
mov cl, byte [0x657ec0]
mov ebx, dword [0x6080a8]
push str.KEY_CODE
push 0x657ed0
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 [0x6080cc]
mov ebp, eax
test ebp, ebp
je 0x4031a8
push esi
push edi
call dword [0x608124]
mov esi, eax
test esi, esi
je 0x4031a1
push ebp
call dword [0x608128]
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 [0x6080a4]
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.00554ee0
push 0x657ed4
push 0x657edc
push edi
call ebx
mov esi, eax
test esi, esi
je 0x40332f
mov ebx, dword [esp + 0x1c]
push esi
push ebx
call dword [0x6080cc]
mov edi, eax
test edi, edi
jne 0x403223
push eax
push 0x657d50
push 0x657ee4
push eax
call dword [0x60834c]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], 0xffffffff
call fcn.00555720
xor eax, eax
jmp 0x403986
push esi
push ebx
call dword [0x608124]
mov ebp, eax
test ebp, ebp
jne 0x40324e
push 0
push 0x657d50
push 0x657f10
push 0
call dword [0x60834c]
push edi
call dword [0x6080a4]
jmp 0x403208
push edi
call dword [0x608128]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40327a
push 0
push 0x657d50
push 0x657f44
push 0
call dword [0x60834c]
push edi
call dword [0x6080a4]
jmp 0x403208
lea esi, [ebp + 8]
push esi
call fcn.0055b83f
mov ebx, eax
push esi
push ebx
call fcn.00500830
mov ecx, dword [esp + 0x20]
add esp, 0xc
push ebp
push ecx
push ebx
lea ecx, [esp + 0x68]
call fcn.00554fb0
push edi
call dword [0x6080a4]
mov eax, dword [0x7af284]
cmp dword [eax + 0x64f4], 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 0x657d50
push 0x657f70
push 0
call dword [0x60834c]
push ebx
call fcn.0055da41
add esp, 4
jmp 0x403208
push ebx
call fcn.0055da41
mov ecx, dword [0x7af284]
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 0x657edc
push edi
call dword [0x6080a8]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x4033e9
push esi
push edi
call dword [0x6080cc]
mov edi, eax
cmp edi, ebx
jne 0x40336f
push ebx
push 0x657d50
push 0x657ee4
push ebx
jmp 0x403202
mov edx, dword [esp + 0x1c]
push esi
push edx
call dword [0x608124]
mov ebp, eax
test ebp, ebp
je 0x403231
push edi
call dword [0x608128]
mov dword [esp + 0x14], eax
test eax, eax
je 0x40325d
lea ebx, [ebp + 8]
push ebx
call fcn.0055b83f
mov esi, eax
push ebx
push esi
call fcn.00500830
mov eax, dword [esp + 0x20]
add esp, 0xc
push ebp
push eax
push esi
lea ecx, [esp + 0x68]
call fcn.00554fb0
push edi
call dword [0x6080a4]
mov edx, dword [0x7af284]
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.0055da41
add esp, 4
xor ebx, ebx
or ebp, 0xffffffff
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], ebp
call fcn.00555720
mov ecx, dword [0x7af284]
cmp dword [ecx + 0x6b9c], ebx
je 0x403468
lea ecx, [esp + 0x5c]
call fcn.00554e90
mov dword [esp + 0x6ec], 1
mov edx, dword [0x7af284]
add edx, 2
push edx
lea ecx, [esp + 0x60]
mov dword [esp + 0x1c], ebx
call fcn.00555470
mov esi, eax
push ebx
lea eax, [esp + 0x1c]
push eax
push esi
push str.direct.dat
lea ecx, [esp + 0x6c]
call fcn.00555000
lea ecx, [esp + 0x5c]
mov edi, eax
mov dword [esp + 0x6ec], ebp
call fcn.00555720
cmp edi, ebx
jne 0x403532
jmp 0x40346c
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x5c]
call fcn.00554e90
mov dword [esp + 0x6ec], 2
mov ecx, dword [0x7af284]
add ecx, 2
push ecx
lea ecx, [esp + 0x60]
mov dword [esp + 0x1c], esi
call fcn.00555470
push 1
lea edx, [esp + 0x1c]
push edx
push eax
push str.key.dat
lea ecx, [esp + 0x6c]
call fcn.00555000
test eax, eax
jne 0x403522
mov eax, dword [0x7af284]
add eax, 2
push eax
lea ecx, [esp + 0xd0]
push str._s____cs2_common_key____
push ecx
call fcn.0055d4f1
add esp, 0xc
lea edx, [esp + 0xcc]
push edx
lea ecx, [esp + 0x60]
call fcn.00555470
push ebx
lea ecx, [esp + 0x1c]
push ecx
push eax
push str.key_com.dat
lea ecx, [esp + 0x6c]
call fcn.00555000
test eax, eax
jmp 0x403522
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6ec], ebp
call fcn.00555720
call fcn.004039b0
test eax, eax
je 0x403554
push ebx
push str.Boot_Error
push str.CD_DVD_ROM
push ebx
call dword [0x60834c]
xor eax, eax
jmp 0x403986
call fcn.005172f0
test eax, eax
je 0x40321c
cmp dword [0x7cfc08], ebx
jne 0x40358a
push 0x27
push str.e:prg_vs2008kclib_dx9include..kcClassBasekcClassBase.h
push 0x6cc
call fcn.005112c0
add esp, 0xc
cmp eax, ebx
je 0x40358a
push 1
mov ecx, eax
call fcn.004f61b0
mov eax, dword [0x7af284]
cmp dword [eax + 0x6c78], ebx
je 0x4035d7
push str.info.txt
add eax, 0x85c
push eax
lea edx, [esp + 0x2d4]
push 2
push edx
call fcn.004ffc50
lea eax, [esp + 0x2dc]
push 1
push eax
call fcn.00500530
add esp, 0x18
push ebx
lea ecx, [esp + 0x2d0]
push ecx
mov ecx, dword [0x7cfbe4]
call fcn.004f1da0
push 0x27
push str.e:prg_vs2008kclib_dx9include..kcClassBasekcClassBase.h
push 4
call fcn.005112c0
add esp, 0xc
cmp eax, ebx
je 0x403607
mov ecx, dword [0x7af284]
lea edx, [esp + 0x28]
add ecx, 0x440
push edx
push ecx
mov ecx, eax
call fcn.004b8c70
jmp 0x403609
xor eax, eax
mov esi, dword [esp + 0x20]
mov dword [esi + 0x1c], eax
cmp dword [esp + 0x28], ebx
je 0x40362a
push 0x65807c
call fcn.00506330
add esp, 4
xor eax, eax
jmp 0x403986
mov edx, dword [0x7af284]
mov dword [esi + 0x20], ebx
cmp byte [edx + 0x6118], 0
je 0x403747
lea ecx, [esp + 0x14]
call fcn.004b8cc0
mov dword [esp + 0x6ec], 3
xor esi, esi
mov bl, 0x41
jmp 0x403660
push esi
lea ecx, [esp + 0x18]
call fcn.004b8dc0
cmp eax, 3
jne 0x4036ed
lea ecx, [esp + 0xcc]
call fcn.005065b0
movsx eax, bl
push eax
lea ecx, [esp + 0x2d0]
push 0x6580a8
push ecx
mov byte [esp + 0x6f8], 4
call fcn.0055d4f1
mov edx, dword [0x7af284]
add edx, 0x6118
push edx
lea eax, [esp + 0x2dc]
push eax
lea ecx, [esp + 0x3e8]
push 2
push ecx
call fcn.004ffc50
add esp, 0x1c
lea edx, [esp + 0x3d4]
push edx
lea ecx, [esp + 0xd0]
call fcn.00506b90
cmp eax, 0xffffffff
jne 0x4036fb
lea ecx, [esp + 0xcc]
mov byte [esp + 0x6ec], 3
call fcn.00506b70
inc bl
inc esi
cmp bl, 0x5a
jle 0x403660
jmp 0x40372d
mov ecx, dword [0x7af284]
movsx eax, bl
push eax
add ecx, 0x6014
push str._c:_
push ecx
call fcn.0055d4f1
add esp, 0xc
lea ecx, [esp + 0xcc]
mov byte [esp + 0x6ec], 3
call fcn.00506b70
lea ecx, [esp + 0x14]
mov dword [esp + 0x6ec], 0xffffffff
call fcn.0055a670
mov esi, dword [esp + 0x20]
xor ebx, ebx
mov ecx, dword [0x7cfbe4]
lea edx, [esp + 0x2c]
push edx
or edi, 0xffffffff
mov dword [esi + 0x2c], ebx
call fcn.004f02e0
mov eax, dword [esp + 0x34]
mov ebp, dword [0x60834c]
cmp eax, 0x10
je 0x403837
cmp eax, 0x20
je 0x403837
push 4
push 0x6580b4
push 0x6580c8
push ebx
call ebp
cmp eax, 7
je 0x40321c
mov eax, dword [0x7af284]
mov dword [esi + 0x2c], 1
cmp dword [eax + 0x6e90], edi
jne 0x403837
push edi
push ebx
push ebx
lea ecx, [esp + 0x44]
call fcn.0042b7a0
mov dword [esp + 0x6ec], 5
mov eax, dword [0x7af284]
movzx ecx, word [eax + 0x6c2a]
movzx edx, word [eax + 0x6c28]
push 0x20
push ecx
push edx
lea ecx, [esp + 0x44]
call fcn.0042b140
test eax, eax
mov eax, dword [0x7af284]
je 0x4037f5
mov dword [eax + 0x6e90], 0x20
jmp 0x403827
movzx ecx, word [eax + 0x6c2a]
movzx edx, word [eax + 0x6c28]
push 0x10
push ecx
push edx
lea ecx, [esp + 0x44]
call fcn.0042b140
test eax, eax
mov eax, dword [0x7af284]
je 0x4038c1
mov dword [eax + 0x6e90], 0x10
lea ecx, [esp + 0x38]
mov dword [esp + 0x6ec], edi
call fcn.0042b840
cmp dword [esi + 0x2c], ebx
jne 0x403951
mov edi, dword [0x6084f0]
push ebx
call edi
mov ecx, dword [0x7af284]
movzx edx, word [ecx + 0x6c28]
cmp edx, eax
jg 0x40386f
push 1
call edi
mov ecx, dword [0x7af284]
movzx edx, word [ecx + 0x6c2a]
cmp edx, eax
jl 0x40387b
cmp dword [ecx + 0x6c38], ebx
jne 0x403922
cmp dword [ecx + 0x6c24], ebx
jne 0x403951
mov eax, dword [esp + 0x1c]
push ebx
push 0x404c40
push ebx
push 0x7f
push eax
call dword [0x6084f4]
sub eax, 0x412
je 0x40390b
sub eax, 1
jne 0x403951
mov eax, dword [0x7af284]
mov dword [eax + 0x6e88], ebx
mov dword [eax + 0x6e8c], ebx
jmp 0x403951
movzx ecx, word [eax + 0x6c2a]
movzx edx, word [eax + 0x6c28]
push ecx
push edx
lea eax, [esp + 0x4e4]
push 0x658128
push eax
call fcn.0055d4f1
add esp, 0x10
push ebx
push 0x658164
lea ecx, [esp + 0x4e4]
push ecx
push ebx
call ebp
lea ecx, [esp + 0x38]
mov dword [esp + 0x6ec], edi
call fcn.0042b840
xor eax, eax
jmp 0x403986
mov eax, dword [0x7af284]
mov dword [eax + 0x6e88], ebx
mov dword [eax + 0x6e8c], 1
jmp 0x403951
mov dword [esi + 0x2c], 1
mov eax, dword [ecx + 0x6e88]
cmp eax, 1
je 0x403951
cmp dword [ecx + 0x6e8c], ebx
je 0x403941
cmp eax, 2
jne 0x403951
push ebx
add ecx, 0x33c
push ecx
push 0x658178
push ebx
call ebp
xor ecx, ecx
cmp dword [esi + 0x2c], ebx
sete cl
push ecx
mov ecx, dword [0x7af280]
call fcn.004267f0
mov edx, dword [0x7af284]
mov dword [edx + 0x6c24], 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.0055d4e2
add esp, 0x6dc
ret