Function at 0x4011b0
Capabilities:
Check if file exists
Create directory
Set file attributes
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c045
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x4120
call fcn.0041bd90
mov eax, dword [0x425040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x40c0], edx
xor edi, edi
mov dword [ebp - 0x40a4], 0x401180
cmp dword [ecx + 0x14], 7
mov dword [ebp - 0x4088], edi
mov dword [ebp - 0x40a8], edi
mov dword [ebp - 0x40a0], 0x4011a0
mov dword [ebp - 0x40d0], 0x401180
mov dword [ebp - 0x40cc], 0x4011a0
jbe 0x401239
mov ecx, dword [ecx]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x40d4], eax
cmp eax, 0xffffffff
jne 0x40126e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40126e
mov al, 1
jmp 0x401a9d
lea eax, [ebp - 0x40dc]
mov dword [ebp - 0x40dc], 0x406e90
mov dword [ebp - 0x40d8], 0x406eb0
mov dword [ebp - 0x4080], 0x406f40
mov dword [ebp - 0x407c], 0x406fa0
mov dword [ebp - 0x4078], 0x406fb0
mov dword [ebp - 0x4074], 0x407000
mov dword [ebp - 0x4070], eax
mov dword [ebp - 0x4068], edi
mov dword [ebp - 0x406c], edi
call fcn.00407020
lea eax, [ebp - 0x40d0]
mov dword [ebp - 0x4120], edi
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x411c], edi
lea eax, [ebp - 0x40a4]
mov dword [ebp - 0x4118], edi
push eax
lea edx, [ebp - 0x4080]
mov dword [ebp - 0x4114], edi
lea ecx, [ebp - 0x4130]
mov dword [ebp - 0x40f0], edi
movups xmmword [ebp - 0x4130], xmm0
mov dword [ebp - 0x40ec], edi
movups xmmword [ebp - 0x4100], xmm0
mov dword [ebp - 0x40e8], edi
call fcn.00406660
mov esi, eax
add esp, 8
test esi, esi
je 0x401340
lea edx, [ebp - 0x40a4]
lea ecx, [ebp - 0x4130]
call fcn.00404360
jmp 0x401a62
xor edx, edx
mov dword [ebp - 0x40b4], esi
xor ecx, ecx
mov dword [ebp - 0x40bc], edi
mov dword [ebp - 0x4084], edx
mov dword [ebp - 0x40b8], edx
mov dword [ebp - 0x409c], ecx
cmp dword [ebp - 0x4114], ecx
jbe 0x401848
mov dword [ebp - 0x40b0], edx
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [ebp - 0x4120]
add eax, edx
mov dword [ebp - 0x4098], eax
mov eax, dword [ebp - 0x40f0]
mov edi, dword [eax + ecx*4 + 4]
lea esi, [eax + ecx*4]
sub edi, dword [esi]
cmp edi, dword [ebp - 0x40a8]
jbe 0x4013e3
push dword [ebp - 0x4088]
call fcn.0040d350
add esp, 4
mov dword [ebp - 0x40a8], edi
add edi, edi
je 0x401867
push edi
call fcn.0040d6d0
mov edi, eax
add esp, 4
mov dword [ebp - 0x4088], edi
test edi, edi
je 0x401869
mov edx, dword [esi + 4]
mov ecx, dword [esi]
sub edx, ecx
jmp 0x4013f4
mov edx, dword [esi + 4]
mov ecx, dword [esi]
sub edx, ecx
mov edi, dword [ebp - 0x4088]
test edi, edi
je 0x401415
mov eax, dword [ebp - 0x40ec]
lea esi, [eax + ecx*2]
test edx, edx
je 0x401415
mov ecx, edi
sub esi, edi
mov ax, word [esi + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x401405
mov eax, dword [ebp - 0x4098]
mov dword [ebp - 0x4090], 0
mov dword [ebp - 0x4094], 0
cmp byte [eax + 0x19], 0
jne 0x40148e
lea eax, [ebp - 0x40d0]
push eax
lea eax, [ebp - 0x40a4]
push eax
lea eax, [ebp - 0x4094]
push eax
lea eax, [ebp - 0x4090]
push eax
lea eax, [ebp - 0x40b8]
push eax
lea eax, [ebp - 0x4084]
push eax
lea eax, [ebp - 0x40bc]
push eax
push dword [ebp - 0x409c]
lea edx, [ebp - 0x4080]
lea ecx, [ebp - 0x4130]
call fcn.00406af0
add esp, 0x20
mov dword [ebp - 0x40b4], eax
test eax, eax
jne 0x401870
push edi
lea ecx, [ebp - 0x44]
call fcn.00401b30
mov dword [ebp - 4], 0
xorps xmm0, xmm0
xor eax, eax
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
mov edx, dword [ebp - 0x40c0]
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 1
call fcn.00401c50
mov esi, eax
add esp, 4
lea eax, [ebp - 0x2c]
cmp eax, esi
je 0x401547
mov ecx, dword [ebp - 0x18]
cmp ecx, 7
jbe 0x401515
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40150b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
add esp, 8
mov dword [ebp - 0x1c], 0
xor eax, eax
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
movups xmm0, xmmword [esi]
movups xmmword [ebp - 0x2c], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x1c], xmm0
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], 7
mov word [esi], ax
mov ecx, dword [ebp - 0x48]
cmp ecx, 7
jbe 0x401581
mov edx, dword [ebp - 0x5c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401577
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
add esp, 8
cmp dword [ebp - 0x18], 7
lea edx, [ebp - 0x2c]
lea esi, [ebp - 0x2c]
cmova edx, dword [ebp - 0x2c]
seta cl
test cl, cl
mov dword [ebp - 0x40c8], edx
cmovne esi, dword [ebp - 0x2c]
xor edx, edx
mov dword [ebp - 0x408c], edx
movzx eax, word [esi]
mov ecx, eax
test ax, ax
je 0x40165f
mov edi, esi
movzx eax, cx
cmp eax, 0x5c
je 0x4015c3
cmp eax, 0x2f
jne 0x401640
xor eax, eax
lea ecx, [ebp - 0x5c]
push esi
mov word [edi], ax
call fcn.00401b30
cmp dword [eax + 0x14], 7
jbe 0x4015d9
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x40c4], eax
cmp ecx, 7
jbe 0x401626
mov edx, dword [ebp - 0x5c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401616
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
mov eax, dword [ebp - 0x40c4]
add esp, 8
test eax, eax
jne 0x401632
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, dword [ebp - 0x408c]
mov eax, 0x5c
mov word [edi], ax
inc edx
movzx eax, word [esi + edx*2]
lea edi, [esi + edx*2]
mov dword [ebp - 0x408c], edx
mov ecx, eax
test ax, ax
jne 0x4015b6
mov edi, dword [ebp - 0x4088]
mov eax, dword [ebp - 0x4098]
push 0
cmp byte [eax + 0x19], 0
je 0x401679
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x40177f
push 0x80
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4016a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401877
mov edx, dword [ebp - 0x4090]
add edx, dword [ebp - 0x4084]
mov edi, dword [ebp - 0x4094]
mov dword [ebp - 0x4090], edx
test edi, edi
je 0x401746
mov dword [ebp - 0x408c], 0
nop
cmp edi, 0x400000
mov dword [ebp - 0x40ac], 0
mov ecx, 0x400000
mov eax, edi
push 0
cmova eax, ecx
lea ecx, [ebp - 0x40ac]
push ecx
push eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x40ac]
sub edi, ecx
mov edx, dword [ebp - 0x4090]
add dword [ebp - 0x408c], ecx
add edx, ecx
mov dword [ebp - 0x4090], edx
test eax, eax
je 0x401726
test ecx, ecx
je 0x401734
test edi, edi
jne 0x4016d0
jmp 0x401734
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401918
mov eax, dword [ebp - 0x4094]
cmp dword [ebp - 0x408c], eax
jne 0x401918
cmp esi, 0xffffffff
je 0x401764
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x401764
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4019b9
mov eax, dword [ebp - 0x4098]
cmp byte [eax + 0x1d], 0
je 0x40177f
push dword [eax + 0x14]
push dword [ebp - 0x40c8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x18]
cmp ecx, 7
jbe 0x4017bd
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4017b3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
add esp, 8
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x30]
mov word [ebp - 0x2c], ax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], eax
cmp ecx, 7
jbe 0x40180e
mov edx, dword [ebp - 0x44]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401804
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
add esp, 8
mov ecx, dword [ebp - 0x409c]
mov edx, dword [ebp - 0x40b0]
inc ecx
add edx, 0x20
mov dword [ebp - 0x409c], ecx
mov dword [ebp - 0x40b0], edx
cmp ecx, dword [ebp - 0x4114]
jb 0x401380
mov esi, dword [ebp - 0x40b4]
mov edi, dword [ebp - 0x4088]
mov edx, dword [ebp - 0x4084]
mov eax, dword [ebp - 0x40a0]
push edx
cmp eax, 0x4011a0
jne 0x401a56
call fcn.0040d350
add esp, 4
jmp 0x401a62
xor edi, edi
mov esi, 2
jmp 0x401842
xor al, al
jmp 0x401a9d
mov byte [ebp - 4], 0
mov esi, 0xb
mov ecx, dword [ebp - 0x18]
cmp ecx, 7
jbe 0x4018ba
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4018b0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
cmp ecx, 7
jbe 0x401842
mov edx, dword [ebp - 0x44]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401909
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
add esp, 8
jmp 0x401842
mov byte [ebp - 4], 0
mov esi, 0xb
mov ecx, dword [ebp - 0x18]
cmp ecx, 7
jbe 0x40195b
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401951
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
cmp ecx, 7
jbe 0x40183c
mov edx, dword [ebp - 0x44]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4019aa
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
add esp, 8
jmp 0x40183c
mov byte [ebp - 4], 0
mov esi, 0xb
mov ecx, dword [ebp - 0x18]
cmp ecx, 7
jbe 0x4019fc
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4019f2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
cmp ecx, 7
jbe 0x40183c
mov edx, dword [ebp - 0x44]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401a47
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401abb
push ecx
push edx
call fcn.0040a2a9
add esp, 8
jmp 0x40183c
lea ecx, [ebp - 0x40a4]
push ecx
call eax
add esp, 8
lea edx, [ebp - 0x40a4]
lea ecx, [ebp - 0x4130]
call fcn.00404360
push edi
call fcn.0040d350
mov eax, dword [ebp - 0x40d4]
add esp, 4
cmp eax, 0xffffffff
je 0x401a98
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x401a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040a26b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.0040d671
int3