Function at 0x401630
Capabilities:
Create directory
Delete file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x402e5b
push eax
mov dword fs:[0], esp
sub esp, 0x220
lea ecx, [esp]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x23c]
push edi
push 4
mov eax, dword [esi]
push ecx
mov ecx, esi
mov bl, 1
call dword [eax + 0x3c]
cmp eax, 4
jne 0x40188b
mov edx, dword [esi]
lea eax, [esp + 0x16]
push 2
push eax
mov ecx, esi
call dword [edx + 0x3c]
cmp eax, 2
jne 0x40188b
mov dx, word [esp + 0x16]
test dx, dx
jl 0x40188b
cmp dx, 0x104
jge 0x40188b
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x12c]
rep stosd dword es:[edi], eax
mov eax, dword [esi]
movsx ecx, dx
movsx edi, dx
lea edx, [esp + 0x12c]
push ecx
push edx
mov ecx, esi
call dword [eax + 0x3c]
cmp eax, edi
jne 0x40188b
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x401731
mov cl, byte [esp + edi + 0x12b]
lea eax, [esp + edi + 0x12b]
cmp cl, 0x5c
jne 0x401731
mov byte [eax], 0
lea eax, [esp + 0x28]
push 0x4051f4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x28]
push 0x405034
push ecx
call esi
lea edx, [esp + 0x12c]
lea eax, [esp + 0x28]
push edx
push eax
call esi
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.MSVCRT.dll__mkdir]
add esp, 4
mov al, bl
jmp 0x40188d
lea edx, [esp + 0x28]
push 0x4051f4
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x28]
push 0x405034
push eax
call edi
lea ecx, [esp + 0x12c]
lea edx, [esp + 0x28]
push ecx
push edx
call edi
lea eax, [esp + 0x28]
push 0x1001
push eax
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CFile::CFile_1
push 0x8000
push 0x42
mov dword [esp + 0x240], 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
je 0x4017fe
mov eax, dword [esp + 0x10]
cmp eax, 0x8000
jl 0x4017da
mov edx, dword [esi]
push 0x8000
push edi
mov ecx, esi
call dword [edx + 0x3c]
cmp eax, 0x8000
jne 0x4017ef
push eax
push edi
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CFile::Write
mov eax, dword [esp + 0x10]
sub eax, 0x8000
cmp eax, 0x8000
mov dword [esp + 0x10], eax
jge 0x4017a7
test eax, eax
jle 0x4017fe
mov edx, dword [esi]
push eax
push edi
mov ecx, esi
call dword [edx + 0x3c]
mov ecx, dword [esp + 0x10]
cmp eax, ecx
je 0x4017f3
xor bl, bl
jmp 0x4017fe
push ecx
push edi
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CFile::Close
test edi, edi
je 0x401869
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test bl, bl
je 0x401851
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x27], 0x5f
jne 0x401851
lea eax, [esp + 0x28]
push eax
call fcn.00401030
add esp, 4
test eax, eax
je 0x401851
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.MSVCRT.dll_remove]
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x238], 0xffffffff
call sub.MFC42.DLL_CFile::CFile
mov al, bl
jmp 0x40188d
mov eax, dword [esp + 0x10]
mov edx, dword [esi]
push 1
push eax
mov ecx, esi
call dword [edx + 0x30]
lea ecx, [esp + 0x18]
mov dword [esp + 0x238], 0xffffffff
call sub.MFC42.DLL_CFile::CFile
xor al, al
mov ecx, dword [esp + 0x230]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x22c
ret