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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44efed
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x45c00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4225d4
test al, 0x10
je 0x4225d4
mov al, 1
jmp 0x4228dd
movzx eax, word [esi]
mov ecx, esi
mov ebx, eax
cmp eax, 0x5c
je 0x4225e5
cmp ebx, 0x2f
jne 0x422615
movzx eax, word [esi + 2]
mov edx, eax
cmp eax, 0x5c
je 0x4225f5
cmp edx, 0x2f
jne 0x422615
cmp word [esi + 4], 0x3f
jne 0x422615
movzx eax, word [esi + 6]
mov edx, eax
cmp eax, 0x5c
je 0x42260c
cmp edx, 0x2f
jne 0x422615
movzx eax, word [esi + 8]
lea ecx, [esi + 8]
jmp 0x422617
mov eax, ebx
movzx eax, ax
or eax, 0x20
sub eax, 0x61
cmp eax, 0x19
ja 0x42264a
cmp word [ecx + 2], 0x3a
jne 0x42264a
movzx eax, word [ecx + 4]
mov edx, eax
cmp eax, 0x5c
je 0x42263c
cmp edx, 0x2f
jne 0x42264a
cmp word [ecx + 6], 0
jne 0x42264a
xor al, al
jmp 0x4228dd
mov ecx, esi
call fcn.00421ed0
mov dword [ebp - 0x68], eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
test bx, bx
je 0x42266d
inc edi
cmp word [esi + edi*2], ax
jne 0x422666
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
add esp, 4
mov dword [ebp - 0x18], edi
mov ebx, eax
mov dword [ebp - 0x14], edi
lea eax, [edi*2 + 2]
mov dword [ebp - 0x1c], ebx
push eax
push esi
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebx + edi*2]
mov dword [ebp - 4], 0
cmp eax, ebx
je 0x4226f1
movzx ecx, word [eax - 2]
sub eax, 2
cmp ecx, 0x5c
je 0x4226cb
cmp ecx, 0x2f
je 0x4226cb
cmp eax, ebx
jne 0x4226b4
jmp 0x4226f1
sub eax, ebx
sar eax, 1
js 0x4226f1
lea ecx, [edi - 1]
cmp eax, ecx
jne 0x4226f1
cmp edi, 1
jne 0x4226e6
mov byte [ebp - 0x61], 1
jmp 0x4228d1
mov edi, ecx
xor eax, eax
mov dword [ebp - 0x18], edi
mov word [ebx + ecx*2], ax
xor ecx, ecx
lea esi, [edi + 1]
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
add esp, 4
mov dword [ebp - 0x28], eax
lea ecx, [esi + esi]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
push ecx
push ebx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov byte [ebp - 4], 1
mov esi, edi
lea esp, [esp]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x42280c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x422797
lea ecx, [ebp - 0x60]
call fcn.00404410
push 0
push ebx
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 2
call fcn.00423940
test al, al
jne 0x42277a
mov byte [ebp - 4], 1
push dword [ebp - 0x38]
call fcn.00449b03
add esp, 4
jmp 0x422797
mov ebx, dword [ebp - 0x40]
mov byte [ebp - 4], 1
push dword [ebp - 0x38]
shr ebx, 4
call fcn.00449b03
add esp, 4
test bl, 1
mov ebx, dword [ebp - 0x1c]
jne 0x42280c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4227c5
lea esi, [ebx + edi*2]
cmp esi, ebx
je 0x4227c5
jmp 0x4227b0
movzx eax, word [esi - 2]
sub esi, 2
cmp eax, 0x5c
je 0x4227ce
cmp eax, 0x2f
je 0x4227ce
cmp esi, ebx
jne 0x4227b0
mov byte [ebp - 0x61], 0
jmp 0x4228c6
sub esi, ebx
sar esi, 1
js 0x4227c5
test esi, esi
je 0x4227c5
cmp esi, 1
jne 0x4227ec
movzx eax, word [ebx]
mov ecx, eax
cmp eax, 0x5c
je 0x4227c5
cmp ecx, 0x2f
je 0x4227c5
lea eax, [esi + 1]
cmp dword [ebp - 0x68], eax
jae 0x4227c5
cmp esi, edi
jae 0x422730
mov edi, esi
xor eax, eax
mov dword [ebp - 0x18], edi
mov word [ebx + esi*2], ax
jmp 0x422730
mov edi, dword [ebp - 0x24]
cmp esi, edi
jge 0x4228c2
jmp 0x422820
mov edx, dword [ebp - 0x28]
add edx, 2
movzx eax, word [edx + esi*2]
lea edx, [edx + esi*2]
mov ecx, edx
test ax, ax
je 0x422854
cmp ax, 0x5c
je 0x4228f9
cmp ax, 0x2f
je 0x4228f9
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x422834
mov esi, edi
cmp esi, dword [ebp - 0x14]
jbe 0x42288a
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
add esp, 4
mov edi, eax
push ebx
call fcn.00449b03
mov ebx, edi
mov dword [ebp - 0x14], esi
add esp, 4
mov dword [ebp - 0x1c], ebx
lea edi, [esi + esi]
test esi, esi
je 0x42289e
push edi
push dword [ebp - 0x28]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x18], esi
push eax
push ebx
mov word [edi + ebx], ax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4227c5
mov edi, dword [ebp - 0x24]
cmp esi, edi
jl 0x422820
mov byte [ebp - 0x61], 1
push dword [ebp - 0x28]
call fcn.00449b03
add esp, 4
push ebx
call fcn.00449b03
mov al, byte [ebp - 0x61]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00449a40
mov esp, ebp
pop ebp
ret
sub ecx, edx
sar ecx, 1
js 0x422854
inc esi
add esi, ecx
jmp 0x422856