Function at 0x403185
Capabilities:
Create directory

Disassembly:
mov eax, 0x45cee7
call fcn.0041f258
sub esp, 0x70
push ebx
xor eax, eax
mov ebx, edx
push esi
push edi
mov esi, ecx
mov edi, eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 7
mov word [ebp - 0x34], ax
mov dword [ebp - 4], 1
cmp dword [ebp + 8], 2
jne 0x4031d4
push dword [ebp + 0x10]
lea ecx, [ebp - 0x34]
call fcn.00403059
jmp 0x4032ec
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x64]
push 5
pop edx
call fcn.0040a8c8
mov dword [ebp - 0x10], 2
cmp dword [eax + 0x14], 8
jb 0x4031f2
mov eax, dword [eax]
mov byte [ebp - 4], 3
mov edx, 0x80000001
push eax
push str.DocumentPath
push 0x463758
lea ecx, [ebp - 0x7c]
call fcn.004170c3
push 6
pop edi
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x10], edi
call fcn.004015da
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x7c]
call fcn.004017c6
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x64]
call fcn.004017c6
cmp dword [ebp - 0x24], 0
jne 0x403289
mov edx, ebx
lea ecx, [ebp - 0x7c]
call fcn.00403580
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x34]
push eax
call fcn.004015da
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x7c]
call fcn.004017c6
cmp dword [ebp - 0x24], 0
jne 0x403289
xor ebx, ebx
lea eax, [ebp - 0x34]
mov byte [ebp + 8], bl
mov ecx, esi
push dword [ebp + 8]
mov dword [esi + 0x10], ebx
push eax
mov dword [esi + 0x14], ebx
call fcn.004016aa
mov dword [ebp - 0x10], 7
jmp 0x403526
cmp dword [ebp - 0x20], 8
lea eax, [ebp - 0x34]
push 0
cmovae eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4032dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
je 0x4032dc
cmp ebx, 0xb7
je 0x4032dc
push str.Unable_to_create_directory
lea ecx, [ebp - 0x64]
call fcn.004014c8
mov byte [ebp - 4], 5
mov edx, ebx
lea ecx, [ebp - 0x64]
call fcn.0040915d
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x64]
call fcn.004017c6
cmp dword [ebp - 0x20], 8
lea ecx, [ebp - 0x34]
cmovae ecx, dword [ebp - 0x34]
call fcn.00403681
lea ecx, [ebp - 0x34]
call fcn.0040a33a
xor ebx, ebx
inc ebx
mov dword [ebp + 0x10], ebx
xor edx, edx
lea ecx, [ebp - 0x64]
push 4
pop eax
cmp ebx, 1
cmovg edx, eax
mov eax, dword [ebp + 8]
mov edx, dword [edx + eax*8 + section..data]
call fcn.0041c337
mov byte [ebp - 4], 6
lea eax, [ebp - 0x34]
and dword [ebp - 0x3c], 0
lea ecx, [ebp - 0x4c]
and dword [ebp - 0x38], 0
push eax
call fcn.00401708
mov byte [ebp - 4], 7
mov ecx, dword [ebp + 0x14]
mov eax, ecx
cmp dword [ecx + 0x14], 8
jb 0x403340
mov eax, dword [ecx]
push eax
push ebx
sub esp, 0x18
lea eax, [ebp - 0x64]
mov ecx, esp
mov dword [ebp - 0x14], esp
xor ebx, ebx
push eax
mov dword [ecx + 0x10], ebx
mov dword [ecx + 0x14], ebx
call fcn.00401708
mov byte [ebp - 4], 8
lea eax, [ebp - 0x7c]
push eax
mov byte [ebp - 4], 7
call fcn.0040c5ba
add esp, 0x24
mov byte [ebp - 4], 9
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x40337d
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.004030e4
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x7c]
call fcn.004017c6
cmp dword [ebp + 8], 2
je 0x4034f1
push str..txt
call fcn.0042a10c
pop ecx
push eax
push str..txt
lea ecx, [ebp - 0x4c]
call fcn.004030e4
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 0x38], 8
lea eax, [ebp - 0x4c]
push ebx
cmovae eax, dword [ebp - 0x4c]
push 0x80
push 1
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 4], 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
cmp ebx, 0xffffffff
jne 0x40348d
mov ecx, eax
sub ecx, 0x50
je 0x403407
sub ecx, 0x67
jne 0x403435
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x4c]
call fcn.004017c6
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x64]
call fcn.004017c6
mov ebx, dword [ebp + 0x10]
inc ebx
cmp dword [ebp - 0x14], 0
mov dword [ebp + 0x10], ebx
jne 0x4032fa
jmp 0x4034d0
push str.Unable_to_create_new_file
lea ecx, [ebp - 0x7c]
call fcn.004014c8
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x7c]
mov edx, dword [ebp - 0x14]
call fcn.0040915d
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x7c]
call fcn.004017c6
push 0
mov ecx, esi
call fcn.004014c8
or edi, 1
mov dword [ebp - 0x10], edi
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x4c]
call fcn.004017c6
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x64]
call fcn.004017c6
mov byte [ebp - 4], 0
jmp 0x403529
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x40349d
push 0
mov edx, ebx
call fcn.0040a565
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x34]
call fcn.00403059
mov byte [ebp - 4], 7
test ebx, ebx
je 0x4034b8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x4c]
call fcn.004017c6
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x64]
call fcn.004017c6
xor ebx, ebx
lea eax, [ebp - 0x34]
mov byte [ebp + 8], bl
mov ecx, esi
push dword [ebp + 8]
mov dword [esi + 0x10], ebx
push eax
mov dword [esi + 0x14], ebx
call fcn.004016aa
or edi, 1
mov dword [ebp - 0x10], edi
jmp 0x403526
mov byte [ebp + 8], bl
lea eax, [ebp - 0x4c]
push dword [ebp + 8]
mov ecx, esi
mov dword [esi + 0x10], ebx
push eax
mov dword [esi + 0x14], ebx
call fcn.004016aa
or edi, 1
mov dword [ebp - 0x10], edi
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x4c]
call fcn.004017c6
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x64]
call fcn.004017c6
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x34]
call fcn.004017c6
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10