Function at 0x470970
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53f970
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x597644]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 4], 0
mov edx, eax
movzx edi, word [eax]
test di, di
je 0x470a15
cmp di, 0x5c
jne 0x4709c2
test esi, esi
mov ecx, edx
cmovne ecx, esi
mov esi, ecx
jmp 0x4709c4
xor esi, esi
movzx ecx, word [edx + 2]
add edx, 2
mov edi, ecx
test cx, cx
jne 0x4709b1
test esi, esi
je 0x470a15
sub esi, eax
sar esi, 1
js 0x470c7c
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x4709fd
push esi
lea ecx, [ebp + 8]
call fcn.0040c910
mov eax, dword [ebp + 8]
cmp esi, dword [eax - 8]
jg 0x470c7c
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp + 8]
mov word [eax + esi*2], cx
mov eax, dword [ebp + 8]
mov ebx, dword [eax - 0xc]
mov edi, 0x54f940
sub edi, eax
push 1
push 0x54f940
sar edi, 1
call fcn.0050b8dc
mov edx, eax
mov ecx, SysReAllocString
sub ecx, edx
mov dword [ebp - 0x18], edx
add esp, 8
cmp ecx, ebx
jl 0x470c86
lea esi, [ebx + edx]
test esi, esi
js 0x470c90
mov eax, dword [ebp + 8]
mov ecx, 1
sub ecx, dword [eax - 4]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax - 8]
sub ecx, esi
or ecx, dword [ebp - 0x10]
jge 0x470a76
push esi
lea ecx, [ebp + 8]
call fcn.0040c910
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
lea ecx, [eax + edi*2]
cmp edi, ebx
jbe 0x470a82
mov ecx, 0x54f940
push edx
push ecx
push edx
lea eax, [eax + ebx*2]
push eax
call fcn.0040c4d0
mov eax, dword [ebp + 8]
add esp, 0x10
cmp esi, dword [eax - 8]
jg 0x470c7c
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp + 8]
or ebx, 0xffffffff
mov word [eax + esi*2], cx
mov eax, dword [ebp + 8]
mov edx, dword [eax - 0xc]
cmp edx, 3
jl 0x470b13
test edx, edx
js 0x470c9a
movzx ecx, word [eax]
cmp ecx, 0x61
jb 0x470acc
cmp ecx, 0x7a
jbe 0x470ad5
add ecx, 0xffffffbf
cmp cx, 0x19
ja 0x470b13
cmp edx, 1
jl 0x470ca4
cmp word [eax + 2], 0x3a
jne 0x470b0c
cmp edx, 2
jl 0x470cae
movzx esi, word [eax + 4]
cmp esi, 0x5c
je 0x470b13
cmp edx, 2
jl 0x470cb8
mov ecx, esi
mov esi, 0x2f2f
cmp cx, si
je 0x470b13
xor esi, esi
jmp 0x470c13
xor edi, edi
test edx, edx
jle 0x470c0e
nop dword [eax]
test edi, edi
js 0x470c7c
cmp edi, edx
jg 0x470c7c
cmp word [eax + edi*2], 0x5c
jne 0x470c02
cmp edi, edx
jl 0x470b4d
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040fbf0
jmp 0x470b76
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x470b5d
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x470b69
call fcn.00412520
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0x10]
call fcn.0041cf20
mov esi, dword [ebp - 0x10]
push esi
mov byte [ebp - 4], 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x470be4
push eax
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x470ba5
cmp eax, 0x50
je 0x470ba5
cmp eax, 0xb7
jne 0x470c45
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
push ecx
mov ecx, eax
mov esi, dword [eax]
mov ebx, dword [esi + 4]
push ebx
push esi
call fcn.0046f9c0
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 4]
mov ecx, 0x15555554
sub ecx, edx
cmp ecx, 1
jb 0x470c72
lea ecx, [edx + 1]
mov edx, dword [ebp - 0x14]
mov dword [edx + 4], ecx
mov dword [esi + 4], eax
mov esi, dword [ebp - 0x10]
mov dword [ebx], eax
or ebx, 0xffffffff
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x470bff
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + 8]
mov edx, dword [eax - 0xc]
inc edi
cmp edi, edx
jl 0x470b20
mov esi, 1
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x470c2f
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov dword [ecx], eax
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x470c6b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + 8]
xor esi, esi
jmp 0x470c13
push str.list_T__too_long
call fcn.0047b627
push 0x80070057
call fcn.0040ada0
push 0x80070057
call fcn.0040ada0
push 0x80070057
call fcn.0040ada0
push 0x80070057
call fcn.0040ada0
push 0x80070057
call fcn.0040ada0
push 0x80070057
call fcn.0040ada0
push 0x80070057
call fcn.0040ada0
int3