Function at 0x10006af0
Capabilities:
Query environment variable
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005ad11
mov eax, dword fs:[0]
push eax
sub esp, 0x8a4
mov eax, dword [0x1006a2a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea eax, [ebp - 0x8ac]
xor esi, esi
mov dword [ebp - 0x8a4], esi
push eax
mov dword [ebp - 0x8b0], edi
mov dword [ebp - 0x8ac], edi
mov byte [ebp - 0x8a8], 0
call fcn.10008b00
push 0x7fe
lea edx, [ebp - 0x82e]
xor ecx, ecx
push esi
mov dword [ebp - 4], esi
push edx
mov word [ebp - 0x830], cx
call fcn.10029f30
add esp, 0xc
xor eax, eax
push 0x400
lea ecx, [ebp - 0x830]
push ecx
push str._USERPROFILE_FunShion.ini
mov word [ebp - 0x2c], ax
mov dword [ebp - 0x2a], eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea edx, [ebp - 0x830]
push edx
push 0xd
lea eax, [ebp - 0x2c]
push eax
push 0x10061174
push 0x10060ff0
push str.FunShion_Player
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor ecx, ecx
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x838], 7
mov dword [ebp - 0x83c], esi
mov word [ebp - 0x84c], cx
lea edx, [eax + 2]
jmp 0x10006be0
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x10006be0
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x2c]
lea esi, [ebp - 0x84c]
call fcn.100041a0
mov edx, esi
push edx
lea eax, [ebp - 0x868]
push eax
call fcn.100573c0
add esp, 8
lea ebx, [edi + 0x2c]
mov edi, eax
mov esi, ebx
mov byte [ebp - 4], 2
call fcn.10003890
mov edi, 0x10
cmp dword [ebp - 0x854], edi
jb 0x10006c3c
mov ecx, dword [ebp - 0x868]
push ecx
call fcn.100281c4
add esp, 4
mov byte [ebp - 4], 0
cmp dword [ebp - 0x838], 8
mov dword [ebp - 0x854], 0xf
mov dword [ebp - 0x858], 0
mov byte [ebp - 0x868], 0
jb 0x10006c73
mov edx, dword [ebp - 0x84c]
push edx
call fcn.100281c4
add esp, 4
push 2
xor ecx, ecx
lea esi, [ebp - 0x884]
mov edx, ebx
call fcn.10008700
mov byte [ebp - 4], 3
mov esi, dword [eax + 0x10]
mov ecx, esi
mov dword [ebp - 0x8a4], 1
cmp ecx, esi
jae 0x10006c9b
mov ecx, esi
cmp esi, 2
jb 0x10006ca7
mov ecx, 2
cmp dword [eax + 0x14], edi
jb 0x10006cb0
mov edx, dword [eax]
jmp 0x10006cb2
mov edx, eax
mov eax, ecx
mov ecx, 0x10061190
call fcn.10005da0
test eax, eax
jne 0x10006cd6
cmp esi, 2
jae 0x10006ccc
or eax, 0xffffffff
jmp 0x10006cd4
xor eax, eax
cmp esi, 2
setne al
test eax, eax
sete al
test al, al
jne 0x10006d47
push 2
xor ecx, ecx
lea esi, [ebp - 0x84c]
mov edx, ebx
call fcn.10008700
mov esi, dword [eax + 0x10]
mov ecx, esi
mov dword [ebp - 0x8a4], 3
cmp ecx, esi
jae 0x10006d01
mov ecx, esi
cmp esi, 2
jb 0x10006d0d
mov ecx, 2
cmp dword [eax + 0x14], edi
jb 0x10006d16
mov edx, dword [eax]
jmp 0x10006d18
mov edx, eax
mov eax, ecx
mov ecx, 0x100610c0
call fcn.10005da0
test eax, eax
jne 0x10006d3c
cmp esi, 2
jae 0x10006d32
or eax, 0xffffffff
jmp 0x10006d3a
xor eax, eax
cmp esi, 2
setne al
test eax, eax
sete al
test al, al
jne 0x10006d47
xor bl, bl
jmp 0x10006d49
mov bl, 1
test byte [ebp - 0x8a4], 2
je 0x10006d8b
and dword [ebp - 0x8a4], 0xfffffffd
cmp dword [ebp - 0x838], edi
jb 0x10006d70
mov eax, dword [ebp - 0x84c]
push eax
call fcn.100281c4
add esp, 4
xor edi, edi
mov dword [ebp - 0x838], 0xf
mov dword [ebp - 0x83c], edi
mov byte [ebp - 0x84c], 0
jmp 0x10006d8d
xor edi, edi
mov dword [ebp - 4], edi
test byte [ebp - 0x8a4], 1
je 0x10006db1
cmp dword [ebp - 0x870], 0x10
jb 0x10006db1
mov ecx, dword [ebp - 0x884]
push ecx
call fcn.100281c4
add esp, 4
test bl, bl
je 0x10006e10
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x8a8], 0
je 0x10006e09
mov eax, dword [ebp - 0x8ac]
dec dword [eax]
jne 0x10006e09
xor edx, edx
lea ecx, [eax + 4]
xchg dword [ecx], edx
add eax, 8
mov ecx, SysReAllocString
mov edx, eax
lock xadd dword [edx], ecx
test ecx, 0x40000000
jne 0x10006e09
cmp ecx, 0x80000000
jle 0x10006e09
mov ecx, eax
lock bts dword [ecx], 0x1e
jb 0x10006e09
call fcn.10006340
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov al, 1
jmp 0x10007041
mov ebx, dword [ebp - 0x8b0]
cmp dword [ebx + 0x40], 0x10
mov eax, dword [ebx + 0x3c]
lea esi, [ebx + 0x2c]
jb 0x10006e26
mov ecx, dword [esi]
jmp 0x10006e28
mov ecx, esi
push eax
call fcn.10006670
test al, al
jne 0x10006fd4
xor eax, eax
lea edx, [ebp - 0x8a0]
push edx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov word [ebp - 0x14], ax
call fcn.10054f10
add esp, 4
push eax
mov eax, str.FunShion.ini
lea ecx, [ebp - 0x84c]
mov byte [ebp - 4], 5
call fcn.10008ce0
add esp, 4
mov byte [ebp - 4], 7
cmp dword [ebp - 0x88c], 8
jb 0x10006e91
mov eax, dword [ebp - 0x8a0]
push eax
call fcn.100281c4
add esp, 4
mov eax, dword [ebp - 0x84c]
xor ecx, ecx
cmp dword [ebp - 0x838], 8
mov esi, 7
mov dword [ebp - 0x88c], esi
mov dword [ebp - 0x890], edi
mov word [ebp - 0x8a0], cx
jae 0x10006ec0
lea eax, [ebp - 0x84c]
push eax
push 0xd
lea edx, [ebp - 0x2c]
push edx
push 0x10061174
push 0x10060ff0
push str.participation
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor eax, eax
mov word [ebp - 0x868], ax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x854], esi
mov dword [ebp - 0x858], edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x10006ef7
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x2c]
lea esi, [ebp - 0x868]
call fcn.100041a0
mov ecx, esi
push ecx
lea edx, [ebp - 0x884]
push edx
call fcn.100573c0
add esp, 8
mov edi, eax
lea esi, [ebx + 0x2c]
mov byte [ebp - 4], 9
call fcn.10003890
cmp dword [ebp - 0x870], 0x10
jb 0x10006f4d
mov eax, dword [ebp - 0x884]
push eax
call fcn.100281c4
add esp, 4
xor edi, edi
mov ebx, 8
mov dword [ebp - 0x870], 0xf
mov dword [ebp - 0x874], edi
mov byte [ebp - 0x884], 0
cmp dword [ebp - 0x854], ebx
jb 0x10006f82
mov ecx, dword [ebp - 0x868]
push ecx
call fcn.100281c4
add esp, 4
xor edx, edx
mov byte [ebp - 4], dl
mov dword [ebp - 0x854], 7
mov dword [ebp - 0x858], edi
mov word [ebp - 0x868], dx
cmp dword [ebp - 0x838], ebx
jb 0x10006fb5
mov eax, dword [ebp - 0x84c]
push eax
call fcn.100281c4
add esp, 4
mov ebx, dword [ebp - 0x8b0]
xor ecx, ecx
mov dword [ebp - 0x838], 7
mov dword [ebp - 0x83c], edi
mov word [ebp - 0x84c], cx
cmp dword [esi + 0x14], 0x10
mov eax, dword [ebx + 0x3c]
jb 0x10006fe1
mov ecx, dword [esi]
jmp 0x10006fe3
mov ecx, esi
push eax
call fcn.10006670
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x8a8], 0
mov bl, al
je 0x1000703f
mov eax, dword [ebp - 0x8ac]
dec dword [eax]
jne 0x1000703f
xor edx, edx
lea ecx, [eax + 4]
xchg dword [ecx], edx
add eax, 8
mov ecx, SysReAllocString
mov edx, eax
lock xadd dword [edx], ecx
test ecx, 0x40000000
jne 0x1000703f
cmp ecx, 0x80000000
jle 0x1000703f
mov ecx, eax
lock bts dword [ecx], 0x1e
jb 0x1000703f
call fcn.10006340
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100281cf
mov esp, ebp
pop ebp
ret