Function at 0x401e70
Capabilities:
Check if file exists
Create directory
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419cc9
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x420074]
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
xor ebx, ebx
mov al, 1
mov dword [ebp - 4], ebx
mov byte [ebp - 4], al
mov byte [0x422d71], al
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
mov dword [ebp - 0xac], eax
jle 0x402262
lea eax, [ebp - 0x30]
push 9
push eax
call fcn.004048b9
movsx edx, byte [ebp - 0x29]
movsx eax, byte [ebp - 0x30]
movsx ecx, byte [ebp - 0x2a]
mov word [ebp - 0x22], dx
movsx edx, byte [ebp - 0x2d]
mov word [ebp - 0x20], ax
movsx eax, byte [ebp - 0x2c]
mov word [ebp - 0x24], cx
movsx ecx, byte [ebp - 0x2f]
mov word [ebp - 0x1c], dx
push str.APPDATA
lea edx, [ebp - 0xb0]
mov word [ebp - 0x1a], ax
mov word [ebp - 0x1e], cx
push edx
lea eax, [ebp - 0xa4]
xor ecx, ecx
push eax
mov word [ebp - 0x18], cx
call fcn.00404a00
add esp, 0x14
mov edi, 7
xor ecx, ecx
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x54], ebx
mov word [ebp - 0x64], cx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0xa4]
mov ecx, eax
lea esi, [ecx + 2]
lea ecx, [ecx]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x401f40
sub ecx, esi
sar ecx, 1
push ecx
lea ecx, [ebp - 0x68]
call fcn.00403110
xor edx, edx
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x70], ebx
mov word [ebp - 0x80], dx
xor eax, eax
mov dword [ebp - 0x88], edi
mov dword [ebp - 0x8c], ebx
mov word [ebp - 0x9c], ax
mov edi, 8
mov ebx, edi
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 4
call fcn.004033d0
lea ecx, [ebp - 0x68]
push ecx
mov edx, eax
lea esi, [ebp - 0xcc]
call fcn.00402ea0
push 0xffffffffffffffff
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 5
call fcn.004031f0
mov byte [ebp - 4], 4
cmp dword [ebp - 0xb4], edi
jb 0x401fcc
mov edx, dword [ebp - 0xc8]
push edx
call fcn.00404397
add esp, 4
mov ecx, dword [ebp - 0x70]
mov esi, ecx
cmp esi, ebx
jle 0x40202f
cmp esi, ecx
jbe 0x401fe1
call fcn.0040476b
mov ecx, dword [ebp - 0x70]
mov eax, dword [ebp - 0x80]
cmp dword [ebp - 0x6c], edi
jae 0x401fec
lea eax, [ebp - 0x80]
cmp word [eax + esi*2], 0x5c
jne 0x4020db
inc esi
cmp esi, ecx
jbe 0x402001
call fcn.0040476b
mov eax, dword [ebp - 0x80]
cmp dword [ebp - 0x6c], edi
jae 0x40200c
lea eax, [ebp - 0x80]
lea eax, [eax + esi*2]
mov ecx, eax
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x402014
sub ecx, esi
sar ecx, 1
push ecx
lea ecx, [ebp - 0xa0]
call fcn.00403110
xor eax, eax
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
push 0x18
mov eax, str.MicrosoftCommon_Files_
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 6
call fcn.00403110
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x50], edi
jae 0x40205d
lea eax, [ebp - 0x64]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40208c
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x50], edi
jae 0x402076
lea eax, [ebp - 0x64]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x50], edi
jae 0x402089
lea eax, [ebp - 0x64]
push eax
call esi
cmp eax, 0x10
jne 0x4020e1
push ebx
lea ecx, [ebp - 0x68]
push ecx
or eax, 0xffffffff
lea esi, [ebp - 0x4c]
call fcn.00403050
lea eax, [ebp - 0x24]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4020a7
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x4c]
call fcn.00403110
push 1
mov eax, 0x41d704
lea ecx, [ebp - 0x4c]
call fcn.00403110
push ebx
lea edx, [ebp - 0xa0]
push edx
jmp 0x402128
dec esi
jmp 0x401fd1
push 3
mov eax, 0x41d714
lea ecx, [ebp - 0x4c]
call fcn.00403110
lea eax, [ebp - 0x24]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4020f6
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x4c]
call fcn.00403110
push 1
mov eax, 0x41d704
lea ecx, [ebp - 0x4c]
call fcn.00403110
push ebx
lea eax, [ebp - 0xa0]
push eax
or eax, 0xffffffff
lea esi, [ebp - 0x4c]
call fcn.00403050
push 4
mov eax, 0x41d708
mov ecx, esi
call fcn.00403110
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0xa8], ebx
cmp dword [ebp - 0x34], edi
jae 0x402152
lea eax, [ebp - 0x48]
push ebx
push 0x80
push 4
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, ebx
je 0x4021a4
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 0x20], edi
jae 0x402176
lea eax, [ebp + 0xc]
mov edx, dword [ebp - 0xac]
push ebx
lea ecx, [ebp - 0xa8]
push ecx
lea ecx, [edx + edx]
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea edi, [ebp + 8]
call fcn.00402e00
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 8
cmp dword [ebp - 0x34], edi
jb 0x4021b5
mov edx, dword [ebp - 0x48]
push edx
call fcn.00404397
add esp, 4
xor eax, eax
mov esi, 7
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
cmp dword [ebp - 0x88], edi
jb 0x4021dd
mov ecx, dword [ebp - 0x9c]
push ecx
call fcn.00404397
add esp, 4
xor edx, edx
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x8c], ebx
mov word [ebp - 0x9c], dx
cmp dword [ebp - 0x6c], edi
jb 0x402203
mov eax, dword [ebp - 0x80]
push eax
call fcn.00404397
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x70], ebx
mov word [ebp - 0x80], cx
cmp dword [ebp - 0x50], edi
jb 0x402220
mov edx, dword [ebp - 0x64]
push edx
call fcn.00404397
add esp, 4
xor ebx, ebx
mov byte [0x422d71], bl
cmp dword [ebp + 0x20], edi
jb 0x402239
mov eax, dword [ebp + 0xc]
push eax
call fcn.00404397
add esp, 4
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.004041f9
mov esp, ebp
pop ebp
ret
mov edi, 8
jmp 0x402222