Function at 0x401420
Capabilities:
Create directory
Set file attributes

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, dword [eax*4 + 0x41bc70]
xor esi, esi
mov dword [esp + 0xc], esi
mov dword [0x41b048], 1
mov dword [esp + 0x20], edi
cmp edi, esi
jne 0x401453
pop edi
mov eax, 0x86180002
pop esi
add esp, 0x14
ret
mov dword [esp + 0x18], esi
cmp dword [edi + 0x4054], esi
jbe 0x40180e
lea ecx, [edi + 0x409c]
push ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], ecx
push ebp
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x401485
call eax
test eax, eax
je 0x40180c
mov edx, dword [edi + 0x709c]
mov ecx, dword [edi + 0x4078]
mov ebx, dword [edi + 0x4048]
add ebx, dword [esp + 0x18]
lea eax, [edi + edx*2 + 0x609c]
lea edx, [ecx + esi*4]
mov ecx, dword [edx + 4]
sub ecx, dword [edx]
test eax, eax
je 0x4014d5
mov edx, dword [edi + 0x4078]
mov edx, dword [edx + esi*4]
mov esi, dword [edi + 0x407c]
lea edx, [esi + edx*2]
test ecx, ecx
jbe 0x4014d5
sub edx, eax
mov si, word [edx + eax]
mov word [eax], si
add eax, 2
sub ecx, 1
jne 0x4014c6
mov eax, dword [edi + 0x709c]
cmp word [edi + eax*2 + 0x609c], 0
lea esi, [edi + eax*2 + 0x609c]
je 0x401524
lea ecx, [ecx]
cmp word [esi], 0x2f
jne 0x40151b
xor eax, eax
push eax
lea ecx, [edi + 0x609c]
push ecx
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401513
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x5c
mov word [esi], dx
add esi, 2
cmp word [esi], 0
jne 0x4014f0
cmp byte [ebx + 0x19], 0
push 0
je 0x40154c
lea eax, [edi + 0x609c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4017ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4017ed
push 0x80
push 2
push 0
push 1
push 0x40000000
lea esi, [edi + 0x609c]
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
mov dword [esp + 0x1c], ebp
cmp ebp, 0xffffffff
jne 0x401653
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x401653
cmp dword [0x41b048], 0
je 0x4015a4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [0x41b048], 0
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
mov dword [esp + 0x1c], ebp
cmp ebp, 0xffffffff
jne 0x401653
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x401653
mov eax, esi
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4015e0
mov ebx, dword [esp + 0x30]
sub eax, edx
sar eax, 1
lea ecx, [eax + eax]
push ecx
push esi
push ebx
call fcn.0040c6c0
add esp, 0xc
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401604
sub esi, ecx
sar esi, 1
xor edx, edx
mov eax, ebx
mov word [ebx + esi*2], dx
add eax, 0xfffffffe
mov edi, edi
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x401620
mov ecx, dword [str._Open]
mov dword [eax], ecx
mov edx, dword [0x41825c]
mov dword [eax + 4], edx
mov ecx, dword [0x418260]
mov dword [eax + 8], ecx
mov dword [esp + 0x14], 0x86180003
jmp 0x4017ed
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
lea edx, [esp + 0x1c]
add edi, 0x1000
push edx
call fcn.00401850
add esp, 4
test eax, eax
jne 0x40176c
cmp ebp, 0xffffffff
je 0x401752
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x401752
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x401752
cmp dword [0x41b048], 0
je 0x4016be
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [0x41b048], 0
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x401752
call edi
test eax, eax
je 0x401752
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4016e0
mov edi, dword [esp + 0x30]
sub eax, edx
sar eax, 1
lea ecx, [eax + eax]
push ecx
push esi
push edi
call fcn.0040c6c0
add esp, 0xc
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401704
sub esi, ecx
sar esi, 1
xor edx, edx
mov eax, edi
mov word [edi + esi*2], dx
add eax, 0xfffffffe
mov edi, edi
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x401720
mov ecx, dword [str._CLose]
mov dword [eax], ecx
mov edx, dword [0x418278]
mov dword [eax + 4], edx
mov ecx, dword [0x41827c]
mov dword [eax + 8], ecx
mov dx, word [0x418280]
jmp 0x4017dd
cmp byte [ebx + 0x1d], 0
je 0x4017e9
mov eax, dword [ebx + 0x14]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x4017e9
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401771
mov edi, dword [esp + 0x30]
sub eax, edx
sar eax, 1
lea ecx, [eax + eax]
push ecx
push esi
push edi
call fcn.0040c6c0
add esp, 0xc
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401795
sub esi, ecx
sar esi, 1
xor edx, edx
mov eax, edi
mov word [edi + esi*2], dx
add eax, 0xfffffffe
nop
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4017b0
mov ecx, dword [str._Write]
mov dword [eax], ecx
mov edx, dword [0x418268]
mov dword [eax + 4], edx
mov ecx, dword [0x41826c]
mov dword [eax + 8], ecx
mov dx, word [0x418270]
mov dword [esp + 0x14], 0x86180003
mov word [eax + 0xc], dx
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
add dword [esp + 0x18], 0x20
add dword [esp + 0x10], 4
inc esi
mov dword [esp + 0x20], esi
cmp esi, dword [edi + 0x4054]
jb 0x401473
pop ebp
pop ebx
mov eax, dword [esp + 0xc]
pop edi
pop esi
add esp, 0x14
ret