Function at 0x4059e0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [0x81c700]
sub esp, 0x10
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x4065cf
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], 0
sub edx, ecx
cmp edx, eax
jne 0x405a2c
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x405a3f
inc dword [0x8294f0]
call fcn.0045dca0
mov al, byte [0x81c644]
test al, al
jne 0x405a59
mov ecx, 0x83f450
call fcn.005ddd50
mov byte [0x81c644], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x83f450]
cmp eax, ecx
jbe 0x405a6d
sub eax, ecx
jmp 0x405a75
mov ecx, dword [0x83f454]
add eax, ecx
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x405a95
mov edx, ecx
or edx, eax
je 0x405a95
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x4065cf
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x4065cf
mov ecx, dword [0x8294e8]
push ebx
mov dword [0x829468], eax
mov eax, dword [0x829478]
push ebp
push esi
test ecx, ecx
push edi
mov byte [0x81c6fc], 1
not eax
jle 0x405b16
mov ebp, 0x820e44
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp]
test ecx, ecx
je 0x405b08
mov esi, dword [ecx + 4]
test esi, esi
jle 0x405b08
mov edx, dword [ecx]
mov edi, dword [edx + 0xc]
sar edi, 2
test edx, edx
je 0x405b08
test esi, esi
jle 0x405b08
mov ebx, esi
mov ecx, dword [edx]
xor eax, ecx
lea ecx, [edx + 0x14]
test edi, edi
jle 0x405b02
mov esi, edi
xor eax, dword [ecx]
add ecx, 4
dec esi
jne 0x405afa
mov edx, dword [edx + 4]
dec ebx
jne 0x405aed
mov ecx, dword [esp + 0x18]
add ebp, 4
dec ecx
mov dword [esp + 0x18], ecx
jne 0x405acd
cmp eax, dword [0x8294d8]
je 0x405b29
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294e8]
xor edi, edi
cmp eax, edi
je 0x4065c4
mov eax, dword [0x829464]
cmp eax, edi
je 0x405f82
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, edi
je 0x405f77
push edi
add eax, 0x14
push 4
push eax
mov eax, dword [0x829488]
lea ecx, [eax*4 + 0x82948c]
push ecx
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea esi, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [esp + 0x18], esi
mov dword [0x829488], eax
jl 0x405b93
mov dword [0x829488], edi
push edi
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 4
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x405f69
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], edi
sub edx, ecx
cmp edx, eax
jne 0x405be1
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x405bf4
inc dword [0x8294f0]
call fcn.0045dca0
mov al, byte [0x81c644]
test al, al
jne 0x405c0e
mov ecx, 0x83f450
call fcn.005ddd50
mov byte [0x81c644], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x83f450]
cmp eax, ecx
jbe 0x405c22
sub eax, ecx
jmp 0x405c2a
mov ecx, dword [0x83f454]
add eax, ecx
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x405c4a
mov edx, ecx
or edx, eax
je 0x405c4a
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x405f69
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x405f69
mov ecx, dword [0x8294e8]
mov dword [0x829468], eax
mov eax, dword [0x829478]
cmp ecx, edi
mov byte [0x81c6fc], 1
not eax
jle 0x405cc7
mov ebp, 0x820e44
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp]
test ecx, ecx
je 0x405cb9
mov esi, dword [ecx + 4]
test esi, esi
jle 0x405cb9
mov edx, dword [ecx]
mov edi, dword [edx + 0xc]
sar edi, 2
test edx, edx
je 0x405cb9
test esi, esi
jle 0x405cb9
mov ebx, esi
mov ecx, dword [edx]
xor eax, ecx
lea ecx, [edx + 0x14]
test edi, edi
jle 0x405cb3
mov esi, edi
xor eax, dword [ecx]
add ecx, 4
dec esi
jne 0x405cab
mov edx, dword [edx + 4]
dec ebx
jne 0x405c9e
mov ecx, dword [esp + 0x14]
add ebp, 4
dec ecx
mov dword [esp + 0x14], ecx
jne 0x405c7e
cmp eax, dword [0x8294d8]
je 0x405cda
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294e8]
xor edi, edi
cmp eax, edi
je 0x405f5e
mov eax, dword [0x829464]
mov dword [esp + 0x14], edi
cmp eax, edi
je 0x405f24
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, edi
je 0x405f19
mov edx, dword [0x829488]
push edi
add eax, 0x14
push 4
push eax
lea eax, [edx*4 + 0x82948c]
push eax
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea ecx, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [esp + 0x14], ecx
mov dword [0x829488], eax
jl 0x405d49
mov dword [0x829488], edi
push edi
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 4
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x405f09
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], edi
sub edx, ecx
cmp edx, eax
jne 0x405d91
call fcn.00406630
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x405d9e
call fcn.00406630
mov ecx, 0x83f450
call fcn.004065e0
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x405dc8
mov edx, eax
or edx, ecx
je 0x405dc8
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x405f09
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x405f09
mov esi, dword [0x829478]
mov dword [0x829468], eax
mov eax, dword [0x8294e8]
mov byte [0x81c6fc], 1
cmp eax, edi
mov dword [esp + 0x1c], edi
not esi
jle 0x405e6b
mov dword [esp + 0x10], 0x820e44
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
test eax, eax
je 0x405e4d
mov ecx, dword [eax + 4]
test ecx, ecx
jle 0x405e4d
mov edi, dword [eax]
mov ebp, dword [edi + 0xc]
sar ebp, 2
test edi, edi
je 0x405e4d
xor ebx, ebx
test ecx, ecx
jle 0x405e4d
mov ecx, edi
call fcn.00406620
xor esi, eax
lea eax, [edi + 0x14]
test ebp, ebp
jle 0x405e3e
mov ecx, ebp
mov edx, dword [eax]
add eax, 4
xor esi, edx
dec ecx
jne 0x405e34
mov ecx, dword [esp + 0x10]
mov edi, dword [edi + 4]
inc ebx
mov edx, dword [ecx]
cmp ebx, dword [edx + 4]
jl 0x405e22
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov ecx, dword [0x8294e8]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], edx
jl 0x405dff
cmp esi, dword [0x8294d8]
je 0x405e78
call fcn.00406630
mov eax, dword [0x8294e8]
xor esi, esi
cmp eax, esi
je 0x405f00
mov ecx, 0x829464
mov dword [esp + 0x10], esi
call fcn.00406620
test eax, eax
je 0x405ec2
mov ecx, dword [0x829464]
lea eax, [esp + 0x10]
push eax
push ecx
call fcn.00407b70
add esp, 8
test al, al
je 0x405ebd
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x405ebd
cmp dword [eax], 0x29874362
je 0x405ec2
call fcn.00406630
mov ecx, 0x8294b0
mov dword [esp + 0x10], esi
call fcn.00406620
test eax, eax
je 0x405f00
mov eax, dword [0x8294b0]
lea edx, [esp + 0x10]
push edx
push eax
call fcn.00407b70
add esp, 8
test al, al
je 0x405efb
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x405efb
cmp dword [eax], 0xbad0bad
je 0x405f00
call fcn.00406630
mov byte [0x81c6fc], 0
xor edi, edi
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x405f19
cmp dword [eax], 0x29874362
je 0x405f24
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294b0]
mov dword [esp + 0x14], edi
cmp eax, edi
je 0x405f5e
lea ecx, [esp + 0x14]
push ecx
push eax
call fcn.00407b70
add esp, 8
test al, al
je 0x405f53
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x405f53
cmp dword [eax], 0xbad0bad
je 0x405f5e
inc dword [0x8294f0]
call fcn.0045dca0
mov esi, dword [esp + 0x18]
mov byte [0x81c6fc], 0
xor edi, edi
cmp esi, edi
je 0x405f77
cmp dword [esi], 0x29874362
je 0x405f82
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294b0]
cmp eax, edi
je 0x4065c4
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, edi
je 0x4065b9
mov edx, dword [0x829488]
push edi
add eax, 0x14
push 4
push eax
lea eax, [edx*4 + 0x82948c]
push eax
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea esi, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [esp + 0x18], esi
mov dword [0x829488], eax
jl 0x405fde
mov dword [0x829488], edi
push edi
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 4
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x4065ad
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], edi
sub edx, ecx
cmp edx, eax
jne 0x40602c
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x40603f
inc dword [0x8294f0]
call fcn.0045dca0
mov al, byte [0x81c644]
test al, al
jne 0x406059
mov ecx, 0x83f450
call fcn.005ddd50
mov byte [0x81c644], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x83f450]
cmp eax, ecx
jbe 0x40606d
sub eax, ecx
jmp 0x406075
mov ecx, dword [0x83f454]
add eax, ecx
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x406095
mov edx, eax
or edx, ecx
je 0x406095
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x4065ad
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x4065ad
mov ecx, dword [0x8294e8]
mov dword [0x829468], eax
mov eax, dword [0x829478]
cmp ecx, edi
mov byte [0x81c6fc], 1
not eax
jle 0x406112
mov ebp, 0x820e44
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp]
test ecx, ecx
je 0x406104
mov esi, dword [ecx + 4]
test esi, esi
jle 0x406104
mov edx, dword [ecx]
mov edi, dword [edx + 0xc]
sar edi, 2
test edx, edx
je 0x406104
test esi, esi
jle 0x406104
mov ebx, esi
mov ecx, dword [edx]
xor eax, ecx
lea ecx, [edx + 0x14]
test edi, edi
jle 0x4060fe
mov esi, edi
xor eax, dword [ecx]
add ecx, 4
dec esi
jne 0x4060f6
mov edx, dword [edx + 4]
dec ebx
jne 0x4060e9
mov ecx, dword [esp + 0x1c]
add ebp, 4
dec ecx
mov dword [esp + 0x1c], ecx
jne 0x4060c9
cmp eax, dword [0x8294d8]
je 0x406125
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294e8]
xor ebx, ebx
cmp eax, ebx
je 0x4065a2
mov eax, dword [0x829464]
cmp eax, ebx
je 0x40636b
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, ebx
je 0x406360
mov edx, dword [0x829488]
push ebx
add eax, 0x14
push 4
push eax
lea eax, [edx*4 + 0x82948c]
push eax
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea edi, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [esp + 0x10], edi
mov dword [0x829488], eax
jl 0x406190
mov dword [0x829488], ebx
push ebx
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 4
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x406354
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], ebx
sub edx, ecx
cmp edx, eax
jne 0x4061d8
call fcn.00406630
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x4061e5
call fcn.00406630
mov ecx, 0x83f450
call fcn.004065e0
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x40620f
mov edx, eax
or edx, ecx
je 0x40620f
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x406354
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x406354
mov esi, dword [0x829478]
mov dword [0x829468], eax
mov eax, dword [0x8294e8]
mov byte [0x81c6fc], 1
cmp eax, ebx
mov dword [esp + 0x1c], ebx
not esi
jle 0x4062b6
mov dword [esp + 0x14], 0x820e44
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
test eax, eax
je 0x406294
mov ecx, dword [eax + 4]
test ecx, ecx
jle 0x406294
mov edi, dword [eax]
mov ebp, dword [edi + 0xc]
sar ebp, 2
test edi, edi
je 0x406294
xor ebx, ebx
test ecx, ecx
jle 0x406294
mov ecx, edi
call fcn.00406620
xor esi, eax
lea eax, [edi + 0x14]
test ebp, ebp
jle 0x406285
mov ecx, ebp
mov edx, dword [eax]
add eax, 4
xor esi, edx
dec ecx
jne 0x40627b
mov ecx, dword [esp + 0x14]
mov edi, dword [edi + 4]
inc ebx
mov edx, dword [ecx]
cmp ebx, dword [edx + 4]
jl 0x406269
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov ecx, dword [0x8294e8]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edx
jl 0x406246
mov edi, dword [esp + 0x10]
cmp esi, dword [0x8294d8]
je 0x4062c3
call fcn.00406630
mov eax, dword [0x8294e8]
xor esi, esi
cmp eax, esi
je 0x40634b
mov ecx, 0x829464
mov dword [esp + 0x14], esi
call fcn.00406620
test eax, eax
je 0x40630d
mov ecx, dword [0x829464]
lea eax, [esp + 0x14]
push eax
push ecx
call fcn.00407b70
add esp, 8
test al, al
je 0x406308
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x406308
cmp dword [eax], 0x29874362
je 0x40630d
call fcn.00406630
mov ecx, 0x8294b0
mov dword [esp + 0x14], esi
call fcn.00406620
test eax, eax
je 0x40634b
mov eax, dword [0x8294b0]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.00407b70
add esp, 8
test al, al
je 0x406346
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x406346
cmp dword [eax], 0xbad0bad
je 0x40634b
call fcn.00406630
mov byte [0x81c6fc], 0
xor ebx, ebx
cmp edi, ebx
je 0x406360
cmp dword [edi], 0x29874362
je 0x40636b
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294b0]
cmp eax, ebx
je 0x4065a2
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, ebx
je 0x406597
mov ecx, dword [0x829488]
push ebx
add eax, 0x14
push 4
lea edx, [ecx*4 + 0x82948c]
push eax
push edx
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea edi, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [esp + 0x10], edi
mov dword [0x829488], eax
jl 0x4063c7
mov dword [0x829488], ebx
push ebx
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 4
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x40658b
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], ebx
sub edx, ecx
cmp edx, eax
jne 0x40640f
call fcn.00406630
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x40641c
call fcn.00406630
mov ecx, 0x83f450
call fcn.004065e0
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x406446
mov edx, eax
or edx, ecx
je 0x406446
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x40658b
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x40658b
mov esi, dword [0x829478]
mov dword [0x829468], eax
mov eax, dword [0x8294e8]
mov byte [0x81c6fc], 1
cmp eax, ebx
mov dword [esp + 0x1c], ebx
not esi
jle 0x4064ed
mov dword [esp + 0x14], 0x820e44
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
test eax, eax
je 0x4064cb
mov ecx, dword [eax + 4]
test ecx, ecx
jle 0x4064cb
mov edi, dword [eax]
mov ebp, dword [edi + 0xc]
sar ebp, 2
test edi, edi
je 0x4064cb
xor ebx, ebx
test ecx, ecx
jle 0x4064cb
mov ecx, edi
call fcn.00406620
xor esi, eax
lea eax, [edi + 0x14]
test ebp, ebp
jle 0x4064bc
mov ecx, ebp
mov edx, dword [eax]
add eax, 4
xor esi, edx
dec ecx
jne 0x4064b2
mov ecx, dword [esp + 0x14]
mov edi, dword [edi + 4]
inc ebx
mov edx, dword [ecx]
cmp ebx, dword [edx + 4]
jl 0x4064a0
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov ecx, dword [0x8294e8]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edx
jl 0x40647d
mov edi, dword [esp + 0x10]
cmp esi, dword [0x8294d8]
je 0x4064fa
call fcn.00406630
mov eax, dword [0x8294e8]
xor esi, esi
cmp eax, esi
je 0x406582
mov ecx, 0x829464
mov dword [esp + 0x14], esi
call fcn.00406620
test eax, eax
je 0x406544
mov ecx, dword [0x829464]
lea eax, [esp + 0x14]
push eax
push ecx
call fcn.00407b70
add esp, 8
test al, al
je 0x40653f
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x40653f
cmp dword [eax], 0x29874362
je 0x406544
call fcn.00406630
mov ecx, 0x8294b0
mov dword [esp + 0x14], esi
call fcn.00406620
test eax, eax
je 0x406582
mov eax, dword [0x8294b0]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.00407b70
add esp, 8
test al, al
je 0x40657d
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x40657d
cmp dword [eax], 0xbad0bad
je 0x406582
call fcn.00406630
mov byte [0x81c6fc], 0
xor ebx, ebx
cmp edi, ebx
je 0x406597
cmp dword [edi], 0xbad0bad
je 0x4065a2
inc dword [0x8294f0]
call fcn.0045dca0
mov esi, dword [esp + 0x18]
mov byte [0x81c6fc], 0
test esi, esi
je 0x4065b9
cmp dword [esi], 0xbad0bad
je 0x4065c4
inc dword [0x8294f0]
call fcn.0045dca0
pop edi
pop esi
pop ebp
mov byte [0x81c6fc], 0
pop ebx
add esp, 0x10
ret