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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50a798
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x570be0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], edx
mov ebx, ecx
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x425cfc
test al, 0x10
je 0x425cfc
mov eax, dword [0x571ba4]
mov ecx, 0x571ba4
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, str.Directory_already_exists:
mov dword [ebp - 4], 0
test eax, 0xffff0000
jne 0x425bc6
movzx esi, ax
mov ecx, esi
call fcn.0041fcd0
test eax, eax
je 0x425bd3
push esi
push eax
lea ecx, [ebp - 0x10]
call fcn.00420bb0
jmp 0x425bd3
push str.Directory_already_exists:
lea ecx, [ebp - 0x10]
call fcn.00420650
push str.CreateDirectoryRecurcive
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 1
call fcn.004204a0
mov byte [ebp - 4], 2
mov eax, dword [0x571ba4]
mov ecx, 0x571ba4
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x10]
push eax
lea edx, [ebp - 0x18]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.004215a0
push ebx
mov edx, eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
call fcn.004215a0
add esp, 8
mov esi, eax
push 0x54a680
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.004204a0
push 0
push esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
mov byte [ebp - 4], 6
call fcn.004216b0
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
or edi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x425c6d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425c8d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425cad
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425ccd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425ced
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
jmp 0x426226
push 0
push dword [ebx]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x426125
cmp eax, 0xb7
jne 0x425e24
cmp byte [ebp + 8], 0
je 0x42623d
push str.Failed_to_create_directory_because_but_just_because_it_already_exists:
lea ecx, [ebp - 0x18]
call fcn.00420550
push str.CreateDirectoryRecurcive
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 7
call fcn.004204a0
mov byte [ebp - 4], 8
mov eax, dword [0x571ba4]
mov ecx, 0x571ba4
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x2c], esi
lea eax, [ebp - 0x18]
push eax
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 9
call fcn.004215a0
push ebx
mov edx, eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xa
call fcn.004215a0
push 0
mov edx, eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xb
call fcn.004220c0
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
or edi, 0xffffffff
add esp, 0xc
lea ecx, [edx + 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x425db8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425dd8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 8
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425df5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425e15
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 0x426226
or edi, 0xffffffff
cmp byte [ebp + 8], 0
je 0x426038
push str.error:
lea ecx, [ebp - 0x10]
call fcn.00420550
push str.Failed_to_create_directory:
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xc
call fcn.00420550
push str.CreateDirectoryRecurcive
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xd
call fcn.004204a0
mov byte [ebp - 4], 0xe
mov edx, dword [ebp - 0x20]
lea ecx, [ebp - 0x3c]
call fcn.00421630
mov esi, eax
mov byte [ebp - 4], 0xf
mov edx, dword [0x571ba4]
mov ecx, 0x571ba4
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x14]
push eax
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0x10
call fcn.004215a0
push ebx
mov edx, eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0x11
call fcn.004215a0
push 0x5781a0
mov edx, eax
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0x12
call fcn.004215a0
lea ecx, [ebp - 0x10]
push ecx
mov edx, eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0x13
call fcn.004215a0
push esi
mov edx, eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0x14
call fcn.004215a0
push 2
mov edx, eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0x15
call fcn.004220c0
mov byte [ebp - 4], 0x14
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
add esp, 0x18
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425f15
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x13
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425f35
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x12
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425f55
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x11
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425f75
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425f95
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xf
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425fb5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xe
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425fd5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x425ff5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xc
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x426015
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x426038
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.CreateDirectoryRecurcive_
lea ecx, [ebp - 0x1c]
call fcn.004204a0
mov dword [ebp - 4], 0x16
mov eax, dword [0x571ba4]
mov ecx, 0x571ba4
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x3c], esi
lea eax, [ebp - 0x1c]
push eax
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0x17
call fcn.004215a0
mov byte [ebp - 4], 0x18
push dword [ebp - 0x20]
mov edx, eax
lea ecx, [ebp - 0x38]
call fcn.00421510
add esp, 8
mov byte [ebp - 4], 0x19
mov ecx, dword [ebp - 0x24]
push eax
call fcn.00421fc0
mov byte [ebp - 4], 0x18
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4260b3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x17
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4260d3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0x16
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4260f0
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 0x426111
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 0x42623d
push str.Created_directory_successfully:
lea ecx, [ebp - 0x24]
call fcn.00420550
push str.CreateDirectoryRecurcive
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], 0x1a
call fcn.004204a0
mov byte [ebp - 4], 0x1b
mov eax, dword [0x571ba4]
mov ecx, 0x571ba4
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x3c], esi
lea eax, [ebp - 0x24]
push eax
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0x1c
call fcn.004215a0
push ebx
mov edx, eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0x1d
call fcn.004215a0
push 0
mov edx, eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x1e
call fcn.004220c0
mov byte [ebp - 4], 0x1d
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
or edi, 0xffffffff
add esp, 0xc
lea ecx, [edx + 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4261bf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1c
mov edx, dword [ebp - 0x44]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4261df
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0x1b
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4261fc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1a
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x42621c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x42623d
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