Function at 0x477920
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d5367
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
push ebx
push esi
push edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 0x18
mov dword [ebp - 0x14], 0
mov eax, dword [str.CGsData::CGsData]
mov dword [ebp - 0x28], eax
mov ecx, dword [0x5dd7ec]
mov dword [ebp - 0x24], ecx
mov edx, dword [0x5dd7f0]
mov dword [ebp - 0x20], edx
mov eax, dword [0x5dd7f4]
mov dword [ebp - 0x1c], eax
mov cx, word [0x5dd7f8]
mov word [ebp - 0x18], cx
call dword [sym.imp.WS2_32.dll_WSACleanup]
test eax, eax
jne 0x477aec
push str.WSACleanup_ok
push 0x9fff
mov edx, dword [ebp - 0x10]
add edx, 0x518
push edx
call fcn.005b6070
add esp, 0xc
mov eax, dword [ebp - 0x10]
mov byte [eax + 0xa517], 0
xor ecx, ecx
mov cl, byte [0x5f1374]
test ecx, ecx
je 0x477aec
push 0x694638
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
cmp edx, dword [0x6bc77c]
jne 0x4779ee
mov dword [0x6d7fa4], 0x6a8650
jmp 0x477a0f
mov eax, dword [ebp - 0x14]
cmp eax, dword [0x6bc780]
jne 0x477a05
mov dword [0x6d7fa4], 0x694650
jmp 0x477a0f
mov dword [0x6d7fa4], 0x69e650
mov ecx, dword [ebp - 0x10]
add ecx, 0x518
push ecx
call fcn.005b3b30
add esp, 4
cmp eax, 0xa000
jb 0x477a92
push str.D:BF_ServerBFServer_vcMainSrvGsData.cpp
movsx edx, word [0x5f17d8]
add edx, 0xc
push edx
mov eax, dword [ebp - 0x10]
add eax, 0x518
push eax
call fcn.005b3b30
add esp, 4
push eax
lea ecx, [ebp - 0x28]
push ecx
push str.__s__Too_long_msg_length_d_in_Line_d_of__s
mov edx, dword [0x6d7fa4]
push edx
call fcn.005b5240
add esp, 0x18
xor eax, eax
mov al, byte [0x5f1374]
test eax, eax
je 0x477a7f
mov ecx, dword [0x6d7fa4]
push ecx
mov ecx, dword [0x6bc794]
call fcn.00430430
mov edx, dword [0x6d7fa4]
push edx
mov ecx, 0x6905e8
call fcn.004025e0
jmp 0x477ae1
mov eax, dword [ebp - 0x10]
add eax, 0x518
push eax
lea ecx, [ebp - 0x28]
push ecx
push str.__s___s
mov edx, dword [0x6d7fa4]
push edx
call fcn.005b5240
add esp, 0x10
xor eax, eax
mov al, byte [0x5f1374]
test eax, eax
je 0x477ad0
mov ecx, dword [0x6d7fa4]
push ecx
mov ecx, dword [0x6bc794]
call fcn.004302f0
mov edx, dword [0x6d7fa4]
push edx
mov ecx, 0x692610
call fcn.004025e0
push 0x694638
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x10]
add ecx, 0x488
call fcn.00489a70
mov ecx, dword [ebp - 0x10]
add ecx, 0x498
call fcn.00489a70
mov ecx, dword [ebp - 0x10]
add ecx, 0x4b8
call fcn.0048a670
mov dword [ebp - 0x2c], 0
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x478
call fcn.0043a570
mov ecx, dword [eax]
mov dword [ebp - 0x30], ecx
jmp 0x477b44
push 0
lea edx, [ebp - 0x40]
push edx
lea ecx, [ebp - 0x30]
call fcn.0048a560
lea eax, [ebp - 0x44]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x478
call fcn.0043a5a0
push eax
lea ecx, [ebp - 0x30]
call fcn.0043a410
and eax, 0xff
test eax, eax
je 0x477bb3
lea ecx, [ebp - 0x30]
call fcn.0048a920
mov ecx, dword [eax + 4]
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 0
je 0x477bb1
cmp dword [ebp - 0x2c], 0
je 0x477bb1
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x477ba3
push 1
mov ecx, dword [ebp - 0x48]
call fcn.00478040
mov dword [ebp - 0x70], eax
jmp 0x477baa
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x2c], 0
jmp 0x477b36
mov ecx, dword [ebp - 0x10]
add ecx, 0x478
call fcn.0048a450
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x178], 0
je 0x477c14
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x178], 0
je 0x477c14
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x178]
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0x50], edx
cmp dword [ebp - 0x50], 0
je 0x477c00
push 1
mov ecx, dword [ebp - 0x50]
call fcn.00478080
mov dword [ebp - 0x74], eax
jmp 0x477c07
mov dword [ebp - 0x74], 0
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x178], 0
mov ecx, dword [ebp - 0x10]
add ecx, 0x17c
call fcn.00489ee0
mov ecx, dword [ebp - 0x10]
add ecx, 0x2ec
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, dword [ebp - 0x10]
add edx, 0x198
push edx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x1b0], 0x25
jne 0x477d01
mov ecx, dword [ebp - 0x10]
add ecx, 0x200
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, dword [ebp - 0x10]
add edx, 0x218
push edx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [ebp - 0x10]
add eax, 0x230
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, dword [ebp - 0x10]
add ecx, 0x2bc
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, dword [ebp - 0x10]
add edx, 0x274
push edx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [ebp - 0x10]
add eax, 0x28c
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [ebp - 0x34], 0
jmp 0x477cc2
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x10]
call fcn.004bf0f0
cmp dword [ebp - 0x34], eax
jge 0x477d01
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x18
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x1f8]
add ecx, edx
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x18
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x1fc]
add ecx, edx
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x477cb9
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x1f8], 0
je 0x477d32
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x1f8]
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x58]
push edx
call fcn.005a1380
add esp, 4
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x1f8], 0
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x1fc], 0
je 0x477d63
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x1fc]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.005a1380
add esp, 4
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x1fc], 0
mov ecx, dword [ebp - 0x10]
call fcn.00483d30
mov ecx, dword [ebp - 0x10]
add ecx, 0x304
call fcn.0048a210
lea eax, [ebp - 0x60]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x318
call fcn.0048a090
mov ecx, dword [eax]
mov dword [ebp - 0x38], ecx
jmp 0x477da0
push 0
lea edx, [ebp - 0x64]
push edx
lea ecx, [ebp - 0x38]
call fcn.0043dcb0
lea eax, [ebp - 0x68]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x318
call fcn.00443620
push eax
lea ecx, [ebp - 0x38]
call fcn.0043a410
and eax, 0xff
test eax, eax
je 0x477dfa
lea ecx, [ebp - 0x38]
call fcn.00594960
cmp dword [eax], 0
je 0x477df8
lea ecx, [ebp - 0x38]
call fcn.00594960
mov ecx, dword [eax]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x6c]
push edx
call fcn.005a1380
add esp, 4
lea ecx, [ebp - 0x38]
call fcn.00594960
mov dword [eax], 0
jmp 0x477d92
mov ecx, dword [ebp - 0x10]
add ecx, 0x318
call fcn.0048a290
push str..Server_LogGM
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x477e25
push 0
push str..Server_LogGM
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [ebp - 0x10]
add eax, 0x3dc
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, dword [ebp - 0x10]
add ecx, 0x3fc
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, dword [ebp - 0x10]
add edx, 0x41c
push edx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [ebp - 0x10]
add eax, 0x43c
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov byte [ebp - 4], 0x17
mov ecx, dword [ebp - 0x10]
add ecx, 0x50c
call fcn.0043dd60
mov byte [ebp - 4], 0x16
mov ecx, dword [ebp - 0x10]
add ecx, 0x4f8
call fcn.00477900
mov byte [ebp - 4], 0x15
mov ecx, dword [ebp - 0x10]
add ecx, 0x4e8
call fcn.004778e0
mov byte [ebp - 4], 0x14
mov ecx, dword [ebp - 0x10]
add ecx, 0x4d8
call fcn.004778c0
mov byte [ebp - 4], 0x13
mov ecx, dword [ebp - 0x10]
add ecx, 0x4c8
call fcn.004778a0
mov byte [ebp - 4], 0x12
mov ecx, dword [ebp - 0x10]
add ecx, 0x4b8
call fcn.00477880
mov byte [ebp - 4], 0x11
mov ecx, dword [ebp - 0x10]
add ecx, 0x4a8
call fcn.00477880
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x10]
add ecx, 0x498
call fcn.00477860
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x10]
add ecx, 0x488
call fcn.00477860
mov byte [ebp - 4], 0xe
mov ecx, dword [ebp - 0x10]
add ecx, 0x478
call fcn.00477840
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0x10]
add ecx, 0x3c8
call fcn.0043dd60
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x10]
add ecx, 0x3ac
call fcn.0043dd60
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x10]
add ecx, 0x390
call fcn.0043dd60
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x10]
add ecx, 0x324
call fcn.0043dd60
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x10]
add ecx, 0x318
call fcn.0043dd60
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x10]
add ecx, 0x304
call fcn.0043dd60
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x10]
add ecx, 0x2d4
call fcn.0043dd60
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x10]
add ecx, 0x2b0
call fcn.0043dd60
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x10]
add ecx, 0x2a4
call fcn.0043dd60
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x10]
add ecx, 0x268
call fcn.0043dd60
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x10]
add ecx, 0x25c
call fcn.0043dd60
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x10]
add ecx, 0x250
call fcn.0043dd60
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x10]
add ecx, 0x1e8
call fcn.00477820
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x10]
add ecx, 0x1c4
call fcn.004176a0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0x17c
call fcn.0043dd60
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret