Function at 0x402020
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4436ed
mov eax, dword fs:[0]
push eax
sub esp, 0x698
mov eax, dword [0x467a74]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
cmp dword [edi + 4], 0
je 0x4022d2
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x630]
push eax
lea ecx, [ebp - 0x65c]
push ecx
push esi
lea ecx, [edi + 0x1c]
call fcn.00401700
test eax, eax
je 0x4022d2
mov ebx, dword [eax + 4]
mov dword [ebp - 0x630], ebx
test ebx, ebx
je 0x4022d2
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x21a]
push eax
mov word [ebp - 0x21c], dx
call sub.MSVCR100.dll_memset
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x62a]
push edx
mov word [ebp - 0x62c], cx
call sub.MSVCR100.dll_memset
lea eax, [ebp - 0x21c]
push 0x104
push eax
call dword [sym.imp.ServiceCore.dll_public:_static_bool___cdecl_CWHService::GetWorkDirectory_wchar_t__const__unsigned_short_int_]
mov ecx, dword [edi + 4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x28]
add esp, 0x20
push esi
call eax
mov esi, dword [sym.imp.MSVCR100.dll__snwprintf]
push eax
lea ecx, [ebp - 0x21c]
push ecx
push str._sUsers_ld_ld.whc
lea edx, [ebp - 0x62c]
push 0x104
push edx
call esi
add esp, 0x18
lea ecx, [ebp - 0x658]
mov dword [ebp - 4], 0
call fcn.00441f62
lea ecx, [ebp - 0x644]
mov byte [ebp - 4], 1
call sub.mfc100u.dll_CException::CException
lea ecx, [ebp - 0x634]
mov dword [ebp - method.CFileException.virtual_0], vtable.CFileException.0
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push 0
lea ecx, [ebp - 0x634]
mov byte [ebp - 4], 2
mov dword [ebp - 0x63c], 0
mov dword [ebp - 0x638], 0xffffffff
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea eax, [ebp - 0x644]
push eax
push 0x1001
lea ecx, [ebp - 0x62c]
push ecx
lea ecx, [ebp - 0x658]
mov byte [ebp - 4], 3
call sub.mfc100u.dll_CFile::Open
test eax, eax
jne 0x40224b
cmp dword [ebp - 0x63c], 3
jne 0x40224b
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x422]
push eax
mov word [ebp - 0x424], dx
call sub.MSVCR100.dll_memset
lea ecx, [ebp - 0x21c]
push ecx
push str._sUsers
lea edx, [ebp - 0x424]
push 0x104
push edx
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
add esp, 0x1c
push 0
lea eax, [ebp - 0x424]
push eax
call ebx
test eax, eax
jne 0x4021f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40222c
mov ecx, dword [edi + 4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x28]
call eax
push eax
lea ecx, [ebp - 0x21c]
push ecx
push 0x44b4a8
lea edx, [ebp - 0x424]
push 0x104
push edx
call esi
add esp, 0x14
push 0
lea eax, [ebp - 0x424]
push eax
call ebx
push 0
push 0x1001
lea ecx, [ebp - 0x62c]
push ecx
lea ecx, [ebp - 0x658]
call sub.mfc100u.dll_CFile::Open
mov ebx, dword [ebp - 0x630]
mov edx, dword [ebp - 0x654]
mov eax, dword [sym.imp.mfc100u.dll_CFile::hFileNull]
cmp edx, dword [eax]
je 0x4022a3
push 0
push 0x1000
push 0
lea ecx, [ebp - 0x658]
push ecx
lea ecx, [ebp - 0x6a4]
call fcn.00441f56
mov edx, dword [ebx]
mov edx, dword [edx + 8]
lea eax, [ebp - 0x6a4]
push eax
mov ecx, ebx
mov byte [ebp - 4], 4
call edx
lea ecx, [ebp - 0x6a4]
call sub.mfc100u.dll_CArchive::Close
lea ecx, [ebp - 0x6a4]
mov byte [ebp - 4], 3
call sub.mfc100u.dll_CArchive::CArchive
lea ecx, [ebp - 0x634]
mov dword [ebp - method.CFileException.virtual_0], vtable.CFileException.0
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x658]
mov byte [ebp - 4], 0
call sub.mfc100u.dll_CFile::CFile
mov al, 1
jmp 0x4022d4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00442c00
mov esp, ebp
pop ebp
ret