Function at 0x40f4f0
Capabilities:
Create directory
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49efac
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x4be014]
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
cmp dword [0x4c0f90], 0
mov esi, dword [ebp + 8]
je 0x40f853
inc dword [edi + 0x406]
add esi, 0x10
mov ebx, dword [sym.imp.WS2_32.dll_htons]
movzx eax, word [esi]
push eax
call ebx
movzx eax, ax
mov dword [ebp - 0x230], eax
add esi, 2
je 0x40f853
movzx eax, word [esi]
push eax
call ebx
cmp ax, 0x19
jne 0x40f853
lea ecx, [ebp - 0x218]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
cmp dword [ebp - 0x230], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x22c], 0
jbe 0x40f734
lea ebx, [esi + 6]
mov dword [ebp - 0x228], ebx
nop word [eax + eax]
movzx eax, word [ebx - 6]
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x19
jne 0x40f734
push dword [ebx - 4]
call dword [sym.imp.WS2_32.dll_htonl]
push dword [ebx]
mov esi, eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ebx, eax
cmp esi, 0x55dc
jne 0x40f5da
mov dword [edi + 0x366], ebx
jmp 0x40f618
cmp esi, 0x55e2
jne 0x40f5ea
mov dword [edi + 0x36a], ebx
jmp 0x40f618
cmp esi, 0x55e8
jne 0x40f5fa
mov dword [edi + 0x36e], ebx
jmp 0x40f618
cmp esi, 0x5600
jne 0x40f60a
mov dword [edi + 0x372], ebx
jmp 0x40f618
cmp esi, 0x560c
jne 0x40f618
mov dword [edi + 0x376], ebx
mov eax, dword [edi + 0x42e]
test eax, eax
je 0x40f632
cmp esi, dword [edi + 0x432]
jne 0x40f632
cmp ebx, eax
jae 0x40f871
cmp esi, 0x27df
je 0x40f6b2
cmp esi, 0x3988
je 0x40f662
cmp esi, 0x3987
je 0x40f66a
cmp esi, 0x4981
je 0x40f662
cmp esi, 0x615b
je 0x40f662
cmp esi, 0x5da8
jne 0x40f6be
cmp esi, 0x3987
jne 0x40f672
mov dword [edi + 0x4e3], ebx
jmp 0x40f6be
cmp esi, 0x4981
jne 0x40f682
mov dword [edi + 0x4e7], ebx
jmp 0x40f6be
cmp esi, 0x615b
jne 0x40f692
mov dword [edi + 0x4eb], ebx
jmp 0x40f6be
cmp esi, 0x5da8
jne 0x40f6a2
mov dword [edi + 0x4ef], ebx
jmp 0x40f6be
cmp esi, 0x31b0
jne 0x40f6be
mov dword [edi + 0x4f3], ebx
jmp 0x40f6be
mov dword [edi + 0x4db], ebx
mov dword [edi + 0x4df], ebx
mov edx, esi
lea ecx, [ebp - 0x224]
call fcn.004185f0
mov eax, dword [ebp - 0x228]
mov byte [ebp - 4], 1
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_htonl]
push eax
push ebx
push esi
push dword [ebp - 0x224]
lea eax, [ebp - 0x218]
push str._s_d:_d:_d____
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__8]
add esp, 0x18
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x224]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov eax, dword [ebp - 0x22c]
mov ebx, dword [ebp - 0x228]
inc eax
add ebx, 0x19
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x228], ebx
cmp eax, dword [ebp - 0x230]
jb 0x40f5a0
push 0x200
lea eax, [ebp - 0x210]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x214]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
lea ecx, [ebp - 0x220]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
lea ecx, [ebp - 0x21c]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
push 0
push 0
lea eax, [ebp - 0x210]
mov byte [ebp - 4], 4
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push dword [edi + 8]
mov esi, dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__9]
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x214]
push str._sGzxItem
push eax
call esi
add esp, 0x10
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0x10
je 0x40f7c5
push 0
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push dword [edi + 8]
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x214]
push str._sGzxItem_u.ini
push eax
call esi
push dword [edi + 8]
lea eax, [ebp - 0x220]
push 0x4b2b5c
push eax
call esi
push dword [edi + 0x406]
lea eax, [ebp - 0x21c]
push str.Item_d
push eax
call esi
add esp, 0x28
push dword [ebp - 0x214]
push dword [ebp - 0x218]
push dword [ebp - 0x220]
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [ebp - 0x21c]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x220]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x214]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x218]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
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.004429bd
mov esp, ebp
pop ebp
ret 8
cmp dword [0x4c0fd4], 0
je 0x40f891
cmp byte [edi + 0x5f7], 0
je 0x40f891
mov ecx, edi
call fcn.004121b0
mov ecx, edi
call fcn.004121b0
mov dword [edi + 0x416], 1
jmp 0x40f847