Function at 0x401570
Capabilities:
Create directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x403718
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x234
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov eax, dword [ebx]
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x18]
push 4
push ecx
mov ecx, ebx
mov esi, 0x8000
mov dword [ebp - 0x14], 1
call dword [eax + 0x3c]
cmp eax, 4
jne 0x401899
mov edx, dword [ebx]
lea eax, [ebp - 0x1a]
push 2
push eax
mov ecx, ebx
call dword [edx + 0x3c]
cmp eax, 2
jne 0x401899
mov dx, word [ebp - 0x1a]
test dx, dx
jl 0x401899
cmp dx, 0x104
jge 0x401899
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x240]
rep stosd dword es:[edi], eax
mov eax, dword [ebx]
movsx ecx, dx
movsx edi, dx
lea edx, [ebp - 0x240]
push ecx
push edx
mov ecx, ebx
call dword [eax + 0x3c]
cmp eax, edi
jne 0x401899
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x40168c
mov cl, byte [ebp + edi - 0x241]
lea eax, [ebp + edi - 0x241]
cmp cl, 0x5c
jne 0x40168c
mov byte [eax], 0
lea eax, [ebp - 0x13c]
push 0x406294
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [ebp - 0x13c]
push 0x406088
push ecx
call esi
lea edx, [ebp - 0x240]
lea eax, [ebp - 0x13c]
push edx
push eax
call esi
lea ecx, [ebp - 0x13c]
push ecx
call dword [sym.imp.MSVCRT.dll__mkdir]
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x13c]
push 0x406294
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x13c]
push 0x406088
push eax
call edi
lea ecx, [ebp - 0x240]
lea edx, [ebp - 0x13c]
push ecx
push edx
call edi
lea eax, [ebp - 0x13c]
push 0x1001
push eax
lea ecx, [ebp - 0x2c]
call sub.MFC42.DLL_CFile::CFile_1
mov eax, dword [ebp - 0x28]
or edi, 0xffffffff
cmp eax, edi
mov dword [ebp - 4], 0
je 0x401881
push 0x8000
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [ebp - 0x30], eax
jne 0x401725
lea ecx, [ebp - 0x2c]
call sub.MFC42.DLL_CFile::Close
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], edi
call sub.MFC42.DLL_CFile::CFile
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
mov dword [ebp - 0x34], edi
je 0x4017d8
mov eax, dword [ebp - 0x18]
cmp eax, esi
jl 0x401788
mov edx, dword [ebx]
push esi
push edi
mov ecx, ebx
call dword [edx + 0x3c]
cmp eax, esi
je 0x401754
xor esi, esi
jmp 0x4017db
push esi
push edi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::Write
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], 0
sub eax, esi
mov dword [ebp - 0x18], eax
jmp 0x401739
test eax, eax
jle 0x4017d8
mov edx, dword [ebx]
push eax
push edi
mov ecx, ebx
call dword [edx + 0x3c]
cmp eax, dword [ebp - 0x18]
je 0x4017a3
mov dword [ebp - 0x14], 0
jmp 0x4017d8
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x2c]
push eax
push edi
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CFile::Write
mov dword [ebp - 4], 0
jmp 0x4017d8
mov esi, dword [ebp - 0x14]
lea ecx, [ebp - 0x2c]
call sub.MFC42.DLL_CFile::Close
test edi, edi
je 0x40185b
mov edi, dword [ebp - 0x30]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test esi, esi
je 0x401839
lea edi, [ebp - 0x13c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ebp + ecx - 0x13d], 0x5f
jne 0x401839
lea ecx, [ebp - 0x13c]
push ecx
call fcn.00401070
add esp, 4
test eax, eax
je 0x401839
lea edx, [ebp - 0x13c]
push edx
call dword [sym.imp.MSVCRT.dll_remove]
add esp, 4
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CFile::CFile
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, 0xffffffff
jne 0x40187e
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], esi
call sub.MFC42.DLL_CFile::CFile
or eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or edi, 0xffffffff
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebx]
push 1
push ecx
mov ecx, ebx
call dword [eax + 0x30]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], edi
call sub.MFC42.DLL_CFile::CFile
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret