Function at 0x401810
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53ab69
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x56d380]
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 esi, dword [ebp + 0xc]
push 0
mov edi, ecx
mov dword [ebp - 0x220], esi
call fcn.00501c1d
add esp, 4
cmp dword [edi + 0x10a0], 0
je 0x401870
push str.InitYYPP_Has_Done_
mov eax, edi
call fcn.004016c0
add esp, 4
jmp 0x401abf
push 0
lea eax, [edi + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [edi + 0x2c], 0
jne 0x401a03
mov ecx, dword [edi + 0x30]
cmp dword [ecx - 0xc], 0
jne 0x401904
xor edx, edx
push 0x208
push edx
lea eax, [ebp - 0x21a]
push eax
mov word [ebp - 0x21c], dx
call fcn.00500080
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [ebp - 0x21c]
push 0x5c
push edx
call fcn.004fe9d5
add esp, 8
test eax, eax
je 0x4018dc
xor ecx, ecx
mov word [eax + 2], cx
push str.log_
lea edx, [ebp - 0x21c]
push 0x105
push edx
call fcn.00504b7a
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
lea ecx, [edi + 0x30]
call fcn.00404050
push 1
lea ecx, [ebp - 0x228]
push ecx
lea ecx, [edi + 0x30]
call fcn.00403100
mov eax, dword [eax]
push 0x556338
push eax
call fcn.004fe94a
add esp, 8
test eax, eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x228]
setne bl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401953
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x401964
push 0x556338
lea ecx, [edi + 0x30]
call fcn.00403080
mov eax, dword [edi + 0x30]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40197e
mov eax, dword [edi + 0x30]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x8b0
call fcn.00500120
mov ebx, eax
add esp, 4
mov dword [ebp - 0x224], ebx
mov ecx, 1
mov dword [ebp - 4], ecx
test ebx, ebx
je 0x4019c5
mov eax, dword [edi + 0x30]
cmp dword [eax - 4], ecx
jle 0x4019b3
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [edi + 0x30]
call fcn.00403c80
mov eax, dword [edi + 0x30]
push 0x55633c
push eax
mov ecx, ebx
call fcn.00401050
jmp 0x4019c7
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0x2c], eax
mov eax, dword [edi + 0x30]
mov ecx, dword [eax - 8]
test eax, eax
je 0x4019e9
push ecx
push eax
call fcn.005025f8
add esp, 8
test eax, eax
js 0x401a2e
mov ecx, dword [edi + 0x30]
cmp eax, dword [ecx - 8]
jg 0x401a2e
mov esi, dword [ebp - 0x220]
mov dword [ecx - 0xc], eax
mov edx, dword [edi + 0x30]
xor ecx, ecx
mov word [edx + eax*2], cx
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov dword [edi + 0xc], eax
mov eax, esi
mov dword [edi + 4], edx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401a14
sub eax, edx
push 0xffffffffffffffff
jne 0x401a38
push str.127.0.0.1
push 0x14
lea ecx, [edi + 0x10]
push ecx
jmp 0x401a3f
push 0x80070057
call fcn.00404190
push esi
push 0x14
lea edx, [edi + 0x10]
push edx
call fcn.005044d8
mov eax, dword [ebp + 0x14]
mov dword [edi + 8], eax
mov eax, dword [ebp + 0x18]
add esp, 0x10
mov dword [edi + 0x24], eax
test eax, eax
jne 0x401a6a
push str.InitYYPP_CallbackMsgNull
mov eax, edi
call fcn.004016c0
add esp, 4
xor eax, eax
jmp 0x401ac4
lea esi, [edi + 0x38]
call fcn.00404a20
test eax, eax
je 0x401ae2
lea esi, [edi + 0x38]
call fcn.00404bb0
push 1
mov esi, edi
call fcn.00402d10
lea esi, [edi + 0x38]
call fcn.00404cf0
mov ax, word [ebp + 0x1c]
mov edx, dword [ebp + 0x10]
movsx ecx, ax
push ecx
mov word [edi + 0x10a4], ax
mov eax, dword [ebp + 8]
push edx
push eax
push str.InitYYPP_Port_d_ClientProcID_d_GameID_d
mov eax, edi
mov dword [edi + 0x10a0], 1
call fcn.004016c0
add esp, 0x10
mov eax, 1
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.00500397
mov esp, ebp
pop ebp
ret 0x18
push str.InitYYPP_ProxyInit_Fail
mov eax, edi
call fcn.004016c0
add esp, 4
xor eax, eax
jmp 0x401ac4