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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10060831
mov eax, dword fs:[0]
push eax
sub esp, 0x8a4
mov eax, dword [0x10072368]
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
xor ebx, ebx
lea eax, [ebp - 0x8ac]
mov dword [ebp - 0x8a4], ebx
push eax
mov dword [ebp - 0x8b0], edi
mov dword [ebp - 0x8ac], edi
mov byte [ebp - 0x8a8], bl
call fcn.10008f80
push 0x7fe
lea edx, [ebp - 0x82e]
xor ecx, ecx
push ebx
mov dword [ebp - 4], ebx
push edx
mov word [ebp - 0x830], cx
call fcn.1002c660
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 0x10067804
push 0x10067570
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], ebx
mov word [ebp - 0x84c], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x10007057
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x2c]
lea esi, [ebp - 0x84c]
call fcn.100041e0
mov edx, esi
push edx
lea eax, [ebp - 0x868]
push eax
call fcn.1005bf90
add esp, 8
add edi, 0x2c
push eax
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.100038c0
cmp dword [ebp - 0x854], 0x10
jb 0x100070ae
mov ecx, dword [ebp - 0x868]
push ecx
call fcn.1002a8ed
add esp, 4
mov byte [ebp - 4], 0
cmp dword [ebp - 0x838], 8
mov dword [ebp - 0x854], 0xf
mov dword [ebp - 0x858], ebx
mov byte [ebp - 0x868], 0
jb 0x100070e1
mov edx, dword [ebp - 0x84c]
push edx
call fcn.1002a8ed
add esp, 4
push 2
xor ecx, ecx
lea esi, [ebp - 0x884]
mov edx, edi
call fcn.10008b80
mov ebx, 3
mov byte [ebp - 4], bl
mov esi, dword [eax + 0x10]
mov ecx, esi
mov dword [ebp - 0x8a4], 1
cmp ecx, esi
jae 0x1000710d
mov ecx, esi
cmp esi, 2
jb 0x10007119
mov ecx, 2
cmp dword [eax + 0x14], 0x10
jb 0x10007123
mov edx, dword [eax]
jmp 0x10007125
mov edx, eax
mov eax, ecx
mov ecx, 0x10067820
call fcn.10005df0
test eax, eax
jne 0x10007149
cmp esi, 2
jae 0x1000713f
or eax, 0xffffffff
jmp 0x10007147
xor eax, eax
cmp esi, 2
setne al
test eax, eax
sete al
test al, al
jne 0x100071b7
push 2
xor ecx, ecx
lea esi, [ebp - 0x84c]
mov edx, edi
call fcn.10008b80
mov esi, dword [eax + 0x10]
mov ecx, esi
mov dword [ebp - 0x8a4], ebx
cmp ecx, esi
jae 0x10007170
mov ecx, esi
cmp esi, 2
jb 0x1000717c
mov ecx, 2
cmp dword [eax + 0x14], 0x10
jb 0x10007186
mov edx, dword [eax]
jmp 0x10007188
mov edx, eax
mov eax, ecx
mov ecx, 0x10067640
call fcn.10005df0
test eax, eax
jne 0x100071ac
cmp esi, 2
jae 0x100071a2
or eax, 0xffffffff
jmp 0x100071aa
xor eax, eax
cmp esi, 2
setne al
test eax, eax
sete al
test al, al
jne 0x100071b7
xor bl, bl
jmp 0x100071b9
mov bl, 1
test byte [ebp - 0x8a4], 2
mov esi, 0x10
je 0x10007200
and dword [ebp - 0x8a4], 0xfffffffd
cmp dword [ebp - 0x838], esi
jb 0x100071e5
mov eax, dword [ebp - 0x84c]
push eax
call fcn.1002a8ed
add esp, 4
mov dword [ebp - 0x838], 0xf
mov dword [ebp - 0x83c], 0
mov byte [ebp - 0x84c], 0
mov dword [ebp - 4], 0
test byte [ebp - 0x8a4], 1
je 0x10007227
cmp dword [ebp - 0x870], esi
jb 0x10007227
mov ecx, dword [ebp - 0x884]
push ecx
call fcn.1002a8ed
add esp, 4
test bl, bl
je 0x10007286
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x8a8], 0
je 0x1000727f
mov eax, dword [ebp - 0x8ac]
dec dword [eax]
jne 0x1000727f
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 0x1000727f
cmp ecx, 0x80000000
jle 0x1000727f
mov ecx, eax
lock bts dword [ecx], 0x1e
jb 0x1000727f
call fcn.100067d0
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov al, 1
jmp 0x100074b1
mov edx, dword [ebp - 0x8b0]
mov eax, dword [edx + 0x3c]
cmp dword [edi + 0x14], esi
jb 0x10007298
mov ecx, dword [edi]
jmp 0x1000729a
mov ecx, edi
push eax
call fcn.10006b00
test al, al
jne 0x1000743f
xor eax, eax
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
lea eax, [ebp - 0x8a0]
push eax
xor esi, esi
call int.10059940
add esp, 4
push eax
mov eax, str.FunShion.ini
lea ecx, [ebp - 0x84c]
mov byte [ebp - 4], 5
call fcn.10009220
add esp, 4
mov byte [ebp - 4], 7
cmp dword [ebp - 0x88c], 8
jb 0x10007305
mov ecx, dword [ebp - 0x8a0]
push ecx
call fcn.1002a8ed
add esp, 4
mov eax, dword [ebp - 0x84c]
xor edx, edx
cmp dword [ebp - 0x838], 8
mov ebx, 7
mov dword [ebp - 0x88c], ebx
mov dword [ebp - 0x890], esi
mov word [ebp - 0x8a0], dx
jae 0x10007334
lea eax, [ebp - 0x84c]
push eax
push 0xd
lea eax, [ebp - 0x2c]
push eax
push 0x10067804
push 0x10067570
push str.participation
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor ecx, ecx
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x854], ebx
mov dword [ebp - 0x858], esi
mov word [ebp - 0x868], cx
lea edx, [eax + 2]
jmp 0x10007370
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x10007370
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x2c]
lea esi, [ebp - 0x868]
call fcn.100041e0
mov edx, esi
push edx
lea eax, [ebp - 0x884]
push eax
call fcn.1005bf90
add esp, 8
push eax
mov ecx, edi
mov byte [ebp - 4], 9
call fcn.100038c0
cmp dword [ebp - 0x870], 0x10
jb 0x100073c4
mov ecx, dword [ebp - 0x884]
push ecx
call fcn.1002a8ed
add esp, 4
xor esi, esi
cmp dword [ebp - 0x854], 8
mov dword [ebp - 0x870], 0xf
mov dword [ebp - 0x874], esi
mov byte [ebp - 0x884], 0
jb 0x100073f5
mov edx, dword [ebp - 0x868]
push edx
call fcn.1002a8ed
add esp, 4
xor eax, eax
mov byte [ebp - 4], al
cmp dword [ebp - 0x838], 8
mov dword [ebp - 0x854], ebx
mov dword [ebp - 0x858], esi
mov word [ebp - 0x868], ax
jb 0x10007425
mov ecx, dword [ebp - 0x84c]
push ecx
call fcn.1002a8ed
add esp, 4
xor edx, edx
mov dword [ebp - 0x83c], esi
mov dword [ebp - 0x838], ebx
mov word [ebp - 0x84c], dx
mov esi, 0x10
mov eax, dword [ebp - 0x8b0]
mov eax, dword [eax + 0x3c]
cmp dword [edi + 0x14], esi
jb 0x10007451
mov ecx, dword [edi]
jmp 0x10007453
mov ecx, edi
push eax
call fcn.10006b00
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x8a8], 0
mov bl, al
je 0x100074af
mov eax, dword [ebp - 0x8ac]
dec dword [eax]
jne 0x100074af
xor ecx, ecx
lea edx, [eax + 4]
xchg dword [edx], ecx
add eax, 8
mov ecx, SysReAllocString
mov edx, eax
lock xadd dword [edx], ecx
test ecx, 0x40000000
jne 0x100074af
cmp ecx, 0x80000000
jle 0x100074af
mov ecx, eax
lock bts dword [ecx], 0x1e
jb 0x100074af
call fcn.100067d0
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.1002a8f8
mov esp, ebp
pop ebp
ret