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

Disassembly:
sub esp, 0x42c
mov eax, dword [0x42c708]
xor eax, esp
mov dword [esp + 0x428], eax
mov eax, dword [esp + 0x430]
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x24], eax
jne 0x404e21
mov eax, dword [esp + 0x438]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404e08
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x428]
xor ecx, esp
call fcn.004143e5
add esp, 0x42c
ret 0xc
cmp dword [esp + 0x434], ecx
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], ecx
jbe 0x40544e
mov ecx, dword [esp + 0x448]
lea eax, [esp + 0x3c]
shr eax, 0x10
add ecx, 0xfffffff0
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], ecx
jmp 0x404e60
push 0x1f4
lea edx, [esp + 0x248]
push 0
push edx
call fcn.00414400
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x450]
lea edx, [ebx + 0x1f4]
add esp, 0xc
cmp edx, ecx
mov eax, 0x1f4
jbe 0x404e95
mov eax, ecx
sub eax, ebx
push eax
mov eax, dword [esp + 0x38]
add eax, ebx
push eax
lea ecx, [esp + 0x24c]
push ecx
call fcn.00413a70
lea edx, [esp + 0x250]
push str.__this_is_tag__
push edx
call fcn.00413840
push 0x104
mov esi, eax
lea eax, [esp + 0x54]
push 0
push eax
mov dword [esp + 0x48], 0
call fcn.00414400
push 0x104
lea ecx, [esp + 0x164]
push 0
push ecx
call fcn.00414400
add esp, 0x2c
test esi, esi
je 0x404fae
push str.name:
push esi
call fcn.00413840
mov esi, eax
mov eax, str.name:
add esp, 8
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404f10
sub eax, edx
add esi, eax
push str.length:
push esi
call fcn.00413840
mov edi, eax
mov edx, edi
sub edx, esi
sub edx, 1
push edx
lea eax, [esp + 0x48]
push esi
push eax
call fcn.00413a70
mov eax, str.length:
add esp, 0x14
lea ecx, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x404f48
sub eax, ecx
lea esi, [eax + edi]
push str.___this_is_tag__
push esi
call fcn.00413840
mov edi, eax
mov ecx, edi
sub ecx, esi
push ecx
lea edx, [esp + 0x14c]
push esi
push edx
call fcn.00413a70
lea eax, [esp + 0x154]
push eax
call fcn.00414c6b
mov dword [esp + 0x40], eax
mov eax, str.___this_is_tag__
add esp, 0x18
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404f92
sub eax, edx
add edi, eax
lea ecx, [esp + 0x244]
sub edi, ecx
add ebx, edi
mov dword [esp + 0x1c], ebx
mov edx, dword [0x42dbf8]
mov eax, dword [edx + 0xc]
mov ecx, 0x42dbf8
call eax
cmp dword [esp + 0x38], 0
lea esi, [eax + 0x10]
mov dword [esp + 0x10], esi
jne 0x404fef
lea ecx, [esp + 0x3c]
movzx edi, cx
push 0
push edi
call fcn.00401140
add esp, 8
test eax, eax
je 0x405001
push edi
push eax
lea ecx, [esp + 0x18]
call fcn.00403080
jmp 0x404ffd
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x14]
call fcn.00402d90
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax]
test ecx, ecx
je 0x405016
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
test eax, eax
jne 0x405026
mov edx, dword [0x42dbf8]
mov eax, dword [edx + 0x10]
mov ecx, 0x42dbf8
call eax
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x405499
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov edx, dword [esp + 0x448]
mov ecx, dword [edx - 0xc]
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [esi - 0xc]
push eax
push esi
push ecx
push edx
lea ecx, [esp + 0x28]
push ecx
call fcn.00402d00
lea eax, [esi - 0x10]
add esp, 0x14
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40507f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x18]
push 0x5c
push esi
call fcn.00413f90
add esp, 8
test eax, eax
je 0x40509a
sub eax, esi
sar eax, 1
mov edi, eax
jns 0x40509c
xor edi, edi
cmp edi, dword [esi - 0xc]
lea eax, [esi - 0x10]
mov dword [esp + 0x30], eax
jl 0x4050bc
push eax
call fcn.00401910
mov ebx, eax
add esp, 4
add ebx, 0x10
mov dword [esp + 0x20], ebx
jmp 0x4050ed
mov ecx, dword [eax]
test ecx, ecx
je 0x4050cd
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
test eax, eax
jne 0x4050dd
mov edx, dword [0x42dbf8]
mov eax, dword [edx + 0x10]
mov ecx, 0x42dbf8
call eax
push eax
push edi
push esi
lea ecx, [esp + 0x2c]
call fcn.00401890
mov ebx, dword [esp + 0x20]
cmp dword [ebx - 0xc], 4
jg 0x4050fc
or ebp, 0xffffffff
mov dword [esp + 0x10], ebp
jmp 0x405121
lea ecx, [ebx + 8]
push 0x5c
push ecx
call fcn.00413f6e
add esp, 8
test eax, eax
jne 0x405117
or ebp, 0xffffffff
mov dword [esp + 0x10], ebp
jmp 0x405121
sub eax, ebx
sar eax, 1
mov ebp, eax
mov dword [esp + 0x10], eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4053a6
mov edx, dword [0x42dbf8]
mov eax, dword [edx + 0xc]
mov ecx, 0x42dbf8
call eax
mov edi, eax
add edi, 0x10
cmp ebp, 0xffffffff
mov dword [esp + 0x14], edi
je 0x405300
test ebp, ebp
mov edi, ebp
jge 0x40515b
xor edi, edi
cmp edi, dword [ebx - 0xc]
jl 0x4051c9
mov ecx, dword [ebx - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
lea esi, [ebx - 0x10]
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x40518d
cmp eax, dword [esi]
jne 0x40518d
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
lea esi, [edi + 0x10]
jmp 0x405232
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x4054a3
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea eax, [eax + eax + 2]
push eax
add esi, 0x10
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.004138c6
add esp, 0x10
lea esi, [edi + 0x10]
jmp 0x405232
mov ecx, dword [ebx - 0x10]
test ecx, ecx
je 0x4051db
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
test eax, eax
jne 0x4051f3
mov edx, dword [0x42dbf8]
mov eax, dword [edx + 0x10]
mov ecx, 0x42dbf8
call eax
test eax, eax
je 0x405499
mov edx, dword [eax]
push 2
mov ecx, eax
mov eax, dword [edx]
push edi
call eax
test eax, eax
je 0x4054a3
test edi, edi
lea esi, [eax + 0x10]
jl 0x4054a8
cmp edi, dword [esi - 8]
jg 0x4054a8
lea eax, [edi + edi]
push eax
push ebx
push eax
mov dword [esi - 0xc], edi
push esi
mov word [esi + eax], 0
call fcn.004138c6
add esp, 0x10
mov ebp, dword [esp + 0x14]
lea edi, [esi - 0x10]
add ebp, 0xfffffff0
cmp edi, ebp
je 0x40528d
cmp dword [ebp + 0xc], 0
lea ebx, [ebp + 0xc]
jl 0x40527b
mov ecx, dword [edi]
cmp ecx, dword [ebp]
jne 0x40527b
push edi
call fcn.00401910
add esp, 4
mov esi, eax
or edx, 0xffffffff
lock xadd dword [ebx], edx
dec edx
test edx, edx
jg 0x405272
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
add esi, 0x10
mov dword [esp + 0x14], esi
jmp 0x405289
mov eax, dword [esi - 0xc]
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402e30
mov ebx, dword [esp + 0x20]
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4052a6
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edi
call esi
cmp eax, 0xffffffff
jne 0x4052cd
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4054b2
cmp ebp, 0xffffffff
je 0x40538a
lea eax, [ebp + 1]
test eax, eax
jl 0x405359
cmp eax, dword [ebx - 0xc]
jge 0x405359
lea ecx, [ebx + eax*2]
push 0x5c
push ecx
call fcn.00413f6e
add esp, 8
test eax, eax
je 0x405359
sub eax, ebx
sar eax, 1
mov ebp, eax
mov dword [esp + 0x10], eax
jmp 0x405360
lea eax, [ebx - 0x10]
lea esi, [edi - 0x10]
cmp eax, esi
je 0x4052ae
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x405346
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x405346
push eax
call fcn.00401910
add esp, 4
mov ebp, eax
or edx, 0xffffffff
lock xadd dword [edi], edx
dec edx
test edx, edx
jg 0x40533a
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
add ebp, 0x10
mov dword [esp + 0x14], ebp
jmp 0x4052a6
mov eax, dword [ebx - 0xc]
push eax
push ebx
lea ecx, [esp + 0x1c]
call fcn.00402e30
jmp 0x4052aa
or ebp, 0xffffffff
mov dword [esp + 0x10], ebp
lea eax, [edi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40537c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
call esi
cmp eax, 0xffffffff
je 0x405131
jmp 0x4053a6
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4053a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4053f7
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
push 0
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x24]
push eax
add ecx, edx
push ecx
push esi
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x1c]
add esi, dword [esp + 0x28]
add dword [esp + 0x24], 1
lea eax, [ebx - 0x10]
mov dword [esp + 0x1c], esi
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405424
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x30]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405441
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, dword [esp + 0x444]
jb 0x404e60
mov eax, dword [esp + 0x448]
xor ecx, ecx
cmp dword [esp + 0x24], ecx
setg cl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov esi, ecx
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40547c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x438]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004143e5
add esp, 0x42c
ret 0xc
push 0x80004005
call fcn.00401000
call fcn.00401600
push 0x80070057
call fcn.00401000
add edi, 0xfffffff0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4054ce
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
add ebx, 0xfffffff0
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4054ea
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40550a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405527
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40547e