Function at 0x477910
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50d4b0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x572bb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x20], edx
mov ebx, ecx
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x477aa2
test al, 0x10
je 0x477aa2
push str.Directory_already_exists:
lea ecx, [ebp - 0x1c]
call fcn.00471c70
push str.CreateDirectoryRecurcive
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call fcn.00471bb0
mov byte [ebp - 4], 1
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x477997
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 2
push eax
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x28]
call fcn.00472fc0
push ebx
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.00472fc0
add esp, 8
mov esi, eax
push 0x54c6b8
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.00471bb0
push 0
push esi
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00473100
mov byte [ebp - 4], 4
or edi, 0xffffffff
mov edx, dword [ebp - 0x10]
mov eax, edi
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x477a13
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov ecx, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477a33
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov ecx, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477a53
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477a73
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477a93
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1c]
jmp 0x477fdd
push 0
push dword [ebx]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov esi, eax
mov dword [ebp - 0x10], esi
test esi, esi
je 0x477ec6
cmp esi, 0xb7
jne 0x477bc0
cmp byte [ebp + 8], 0
je 0x477ff4
push str.Failed_to_create_directory_because_but_just_because_it_already_exists:
lea ecx, [ebp - 0x18]
call fcn.00471c70
push str.CreateDirectoryRecurcive
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 6
call fcn.00471bb0
lea ecx, [ebp - 0x14]
call fcn.00472bb0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 8
push ecx
mov edx, eax
lea ecx, [ebp - 0x24]
call fcn.00472fc0
push ebx
mov edx, eax
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x28]
call fcn.00472fc0
push 0
mov edx, eax
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x1c]
call fcn.00473b30
mov byte [ebp - 4], 9
or edi, 0xffffffff
mov edx, dword [ebp - 0x28]
add esp, 0xc
add edx, 0xfffffff0
mov eax, edi
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x477b51
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 8
mov ecx, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477b71
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 7
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477b91
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
mov ecx, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477bb1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x18]
jmp 0x477fdd
or edi, 0xffffffff
cmp byte [ebp + 8], 0
je 0x477dc5
push str.error:
lea ecx, [ebp - 0x14]
call fcn.00471c70
push str.Failed_to_create_directory:
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xb
call fcn.00471c70
push str.CreateDirectoryRecurcive
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xc
call fcn.00471bb0
mov edx, esi
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x3c]
call fcn.00473060
mov esi, eax
lea ecx, [ebp - 0x38]
call fcn.00472bb0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xf
push ecx
mov edx, eax
lea ecx, [ebp - 0x34]
call fcn.00472fc0
push ebx
mov edx, eax
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x30]
call fcn.00472fc0
push 0x57a15c
mov edx, eax
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x2c]
call fcn.00472fc0
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0x12
push ecx
mov edx, eax
lea ecx, [ebp - 0x24]
call fcn.00472fc0
push esi
mov edx, eax
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x28]
call fcn.00472fc0
push 2
mov edx, eax
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x1c]
call fcn.00473b30
mov byte [ebp - 4], 0x13
add esp, 0x18
mov edx, dword [ebp - 0x28]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477c9f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x12
mov ecx, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477cbf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x11
mov ecx, edi
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477cdf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov ecx, edi
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477cff
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xf
mov ecx, edi
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477d1f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xe
mov ecx, edi
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477d3f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xd
mov ecx, edi
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477d5f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xc
mov ecx, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477d7f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
mov ecx, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477d9f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477dc2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x10]
push str.CreateDirectoryRecurcive_
lea ecx, [ebp - 0x1c]
call fcn.00471bb0
mov dword [ebp - 4], 0x15
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x477df5
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x3c], ebx
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0x16
push eax
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x34]
call fcn.00472fc0
push esi
mov edx, eax
mov byte [ebp - 4], 0x17
lea ecx, [ebp - 0x38]
call fcn.00472f20
add esp, 8
mov byte [ebp - 4], 0x18
mov ecx, dword [ebp - 0x20]
push eax
call fcn.00473a30
mov byte [ebp - 4], 0x17
mov ecx, edi
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477e54
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x16
mov ecx, edi
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477e74
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [ebx - 0x10]
mov byte [ebp - 4], 0x15
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477e91
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x477eb2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 8], 0
je 0x477ff4
push str.Created_directory_successfully:
lea ecx, [ebp - 0x20]
call fcn.00471c70
push str.CreateDirectoryRecurcive
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 0x19
call fcn.00471bb0
mov byte [ebp - 4], 0x1a
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x477f11
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x3c], esi
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 0x1b
push eax
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x44]
call fcn.00472fc0
push ebx
mov edx, eax
mov byte [ebp - 4], 0x1c
lea ecx, [ebp - 0x40]
call fcn.00472fc0
push 0
mov edx, eax
mov byte [ebp - 4], 0x1d
lea ecx, [ebp - 0x10]
call fcn.00473b30
mov byte [ebp - 4], 0x1c
or edi, 0xffffffff
mov edx, dword [ebp - 0x40]
add esp, 0xc
add edx, 0xfffffff0
mov eax, edi
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x477f76
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1b
mov ecx, edi
mov edx, dword [ebp - 0x44]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477f96
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0x1a
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477fb3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x19
mov ecx, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477fd3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x477ff4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret