Function at 0x408020
Capabilities:
Create directory
Create thread
Get common file path
Print debug messages
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x455851
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x478584]
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
push str.CLIENT_SDK:LogGameStart___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [0x47839c]
mov edx, dword [eax + 0xc]
mov ecx, 0x47839c
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x6c], esi
mov dword [ebp - 4], 1
mov eax, dword [0x47839c]
mov edx, dword [eax + 0xc]
mov ecx, 0x47839c
call edx
add eax, 0x10
mov dword [ebp - 0x84], eax
mov byte [ebp - 4], 3
mov eax, dword [0x47839c]
mov edx, dword [eax + 0xc]
mov ecx, 0x47839c
call edx
lea edi, [eax + 0x10]
mov dword [ebp - 0x7c], edi
mov byte [ebp - 4], 5
mov eax, dword [0x47839c]
mov edx, dword [eax + 0xc]
mov ecx, 0x47839c
call edx
lea ebx, [eax + 0x10]
mov dword [ebp - 0x74], ebx
mov byte [ebp - 4], 7
mov eax, dword [0x47839c]
mov edx, dword [eax + 0xc]
mov ecx, 0x47839c
call edx
add eax, 0x10
mov dword [ebp - 0x78], eax
mov byte [ebp - 4], 9
mov eax, dword [0x47839c]
mov edx, dword [eax + 0xc]
mov ecx, 0x47839c
call edx
add eax, 0x10
mov dword [ebp - 0x80], eax
mov byte [ebp - 4], 0xb
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x408116
push 0x104
lea ecx, [ebp - 0x6c]
call fcn.00401390
mov esi, dword [ebp - 0x6c]
push 0
push 0x1a
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0043dbba
add esp, 8
test eax, eax
js 0x408626
cmp eax, dword [esi - 8]
jg 0x408626
xor ecx, ecx
mov dword [esi - 0xc], eax
push 5
mov word [esi + eax*2], cx
push str._sjsy
lea ecx, [ebp - 0x6c]
call fcn.004018e0
mov edx, dword [ebp - 0x6c]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 9
push str.conf.ini
lea ecx, [ebp - 0x6c]
call fcn.004018e0
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x100
or eax, ecx
jge 0x408198
push 0x100
lea ecx, [ebp - 0x7c]
call fcn.00401390
mov edi, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x6c]
push eax
push 0x100
push edi
push 0x45e71c
push 0x45edfc
push 0x45edec
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.0043dbba
add esp, 8
test eax, eax
js 0x408626
cmp eax, dword [edi - 8]
jg 0x408626
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov eax, dword [edi - 0xc]
test eax, eax
jne 0x408235
lea esi, [ebp - 0x70]
call fcn.00406fa0
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x7c]
call fcn.00401f40
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x70]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40821d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x6c]
mov edi, dword [ebp - 0x7c]
push ecx
push edi
push 0x45edfc
push 0x45edec
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, dword [ebx - 8]
mov ecx, 1
sub ecx, dword [ebx - 4]
sub eax, 0x400
or eax, ecx
jge 0x408259
push 0x400
lea ecx, [ebp - 0x74]
call fcn.00401390
mov ebx, dword [ebp - 0x74]
mov edx, dword [ebp - 0x6c]
push edx
push 0x400
push ebx
push 0
push str.flashcookie
push 0x45edec
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [ebx - 8]
push eax
push ebx
call fcn.0043dbba
add esp, 8
test eax, eax
js 0x408626
cmp eax, dword [ebx - 8]
jg 0x408626
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
cmp dword [ebx - 0xc], ecx
jne 0x4082f8
lea edx, [ebp - 0x70]
push edx
call fcn.00407860
add esp, 4
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0x74]
call fcn.00401f40
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x70]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4082dd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x74]
cmp dword [ebx - 0xc], 0
jne 0x4082f8
push 0x58
push str.9K1lCm7EuE9UzyBdanY14rU5RUO8W6zQZdbMGics4VSMPLhoSIUsQfcnyb3b2b_5OGiwurQkPgBL3OXIvU_Rpg00
lea ecx, [ebp - 0x74]
call fcn.004019a0
mov ebx, dword [ebp - 0x74]
lea ecx, [ebp - 0x70]
push ecx
call fcn.00407e80
add esp, 4
mov byte [ebp - 4], 0x10
push eax
lea ecx, [ebp - 0x78]
call fcn.00401f40
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x70]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408334
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x2d
lea ecx, [ebp - 0x78]
call fcn.004067b0
push 0
call fcn.0043f325
mov ecx, dword [ebp - 0x78]
push str.aeb0b26c0c79077c4206bc785701a415
push eax
push str.2005
push ebx
push edi
push ecx
push str.2005001002
lea edx, [ebp - 0x80]
push str._s_s_s_s_s_d_s
push edx
mov dword [ebp - 0x70], eax
call fcn.00406be0
mov edx, dword [ebp - 0x80]
add esp, 0x28
xor eax, eax
mov word [ebp - 0x64], ax
mov eax, edx
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], 0
lea esi, [eax + 2]
jmp 0x408390
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408390
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x64]
call fcn.00406a00
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x64]
push ecx
lea edx, [ebp - 0x2c]
push edx
call fcn.00436da0
add esp, 8
mov byte [ebp - 4], 0x13
cmp dword [eax + 0x14], 0x10
jb 0x4083cb
mov esi, dword [eax]
jmp 0x4083cd
mov esi, eax
lea ecx, [ebp - 0x65]
call fcn.0042cac0
mov byte [ebp - 4], 0x14
push esi
lea ecx, [ebp - 0x65]
call fcn.0042d360
mov esi, eax
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x65]
call fcn.00424db0
mov eax, esi
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x48], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408407
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x48]
call fcn.00406c00
mov byte [ebp - 4], 0x16
cmp dword [ebp - 0x18], 0x10
jb 0x408430
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0043d995
add esp, 4
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
mov byte [ebp - 4], 0x17
mov esi, 8
cmp dword [ebp - 0x50], esi
jb 0x40845c
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.0043d995
add esp, 4
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
xor edx, edx
push ecx
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], 0
mov word [ebp - 0x64], dx
call fcn.00436e60
add esp, 8
mov byte [ebp - 4], 0x18
cmp dword [eax + 0x14], esi
jb 0x40848b
mov eax, dword [eax]
mov edx, dword [ebp - 0x70]
push 0x45ec88
push eax
mov eax, dword [ebp - 0x78]
push edx
push str.2005
push ebx
push edi
push eax
lea ecx, [ebp - 0x84]
push str.http:__log.item.kunlun.com_dclog.php_mark2005001002log103mac_sguid_sflashcookie_spid_stime_ldsign_sv_s
push ecx
call fcn.00406be0
add esp, 0x24
mov byte [ebp - 4], 0x17
cmp dword [ebp - 0x18], esi
jb 0x4084c9
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0043d995
add esp, 4
mov ecx, dword [ebp - 0x84]
xor eax, eax
push ecx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
call fcn.0043ec6c
add esp, 4
mov esi, eax
push esi
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntryW]
lea edx, [ebp - 0x70]
push edx
push 0
push esi
push 0x405e80
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4798e8], eax
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x34], 0x10
jb 0x408526
mov eax, dword [ebp - 0x48]
push eax
call fcn.0043d995
add esp, 4
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x48], 0
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x80]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40855b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x78]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40857e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
add ebx, 0xfffffff0
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40859e
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov byte [ebp - 4], 3
add edi, 0xfffffff0
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4085be
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x84]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4085e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40860a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.0043dfbe
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00401000
int3