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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42e754
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
push ebx
push esi
push edi
mov eax, dword [0x440040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x14], esi
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x38]
mov dword [ebp - 0x38], eax
lea ecx, [ebp - 0x3c]
mov eax, dword [0x440b34]
mov dword [ebp - 0x1c], esi
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x18], eax
lea eax, [ebp + 0xc]
push eax
mov dword [ebp - 4], 0
call fcn.0040daf0
mov ecx, dword [eax]
mov dword [eax], 0
mov edi, dword [esi + 4]
mov dword [esi + 4], ecx
test edi, edi
je 0x420d6a
mov eax, dword [edi + 8]
test eax, eax
je 0x420d5f
push eax
call fcn.0042b8a6
add esp, 4
push 0xc
push edi
call fcn.0042b893
add esp, 8
mov edi, dword [ebp - 0x3c]
test edi, edi
je 0x420d8c
mov eax, dword [edi + 8]
test eax, eax
je 0x420d81
push eax
call fcn.0042b8a6
add esp, 4
push 0xc
push edi
call fcn.0042b893
add esp, 8
mov edx, dword [esi + 4]
lea edi, [esi + 8]
mov ecx, dword [edx]
lea eax, [ecx + 0x503]
cmp eax, dword [edx + 4]
ja 0x42114b
mov esi, dword [edx + 8]
lea eax, [ebp - 0x54]
add esi, ecx
mov ecx, 0x140
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x14]
mov ecx, edi
add dword [edx], 0x503
call fcn.00420c10
mov byte [ebp - 4], 1
mov ecx, 0x7ffffffe
mov edx, dword [eax + 0x10]
sub ecx, edx
cmp ecx, 7
jb 0x421160
cmp dword [eax + 0x14], 7
jbe 0x420de5
mov eax, dword [eax]
push edx
push eax
push 7
push str.MkFile_
push ecx
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x34]
call fcn.0040e800
push str..zmk
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 2
call fcn.00401a20
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x70], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x60], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
push 0x38
mov byte [ebp - 4], 3
call fcn.0042b863
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
push 0x38
push 0
push esi
mov byte [ebp - 4], 4
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x70]
mov ecx, esi
push eax
call fcn.0040ef90
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0xffffffff
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
mov eax, dword [edi]
mov dword [edi], esi
test eax, eax
je 0x420ea4
push eax
call fcn.0040d370
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x5c]
cmp ecx, 7
jbe 0x420ee2
mov edx, dword [ebp - 0x70]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x420ed8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x420f5f
push ecx
push edx
call fcn.0042b893
add esp, 8
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x20]
cmp ecx, 7
jbe 0x420f1c
mov edx, dword [ebp - 0x34]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x420f12
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x420f5f
push ecx
push edx
call fcn.0042b893
add esp, 8
xor eax, eax
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], al
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x20], 7
mov word [ebp - 0x34], ax
cmp ecx, 7
jbe 0x420f6f
mov edx, dword [ebp - 0x54]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x420f65
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x420f65
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0042b893
add esp, 8
mov eax, dword [edi]
cmp dword [eax + 0x14], 7
jbe 0x420f79
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x420f8d
test al, 0x10
je 0x421116
mov esi, dword [ebp - 0x18]
mov ecx, esi
call fcn.004183b0
push str.Attempting_to_save_mouse_and_keyboard_settings..._r_n
push 0xc8c8c8
push esi
call fcn.00418430
add esp, 0xc
push 0
push str.MkFile
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x421024
push 6
xorps xmm0, xmm0
mov dword [ebp - 0x24], eax
push str.MkFile
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x20], eax
movups xmmword [ebp - 0x34], xmm0
call fcn.00402500
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 5
push eax
call fcn.004221a0
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x20]
cmp ecx, 7
jbe 0x421024
mov edx, dword [ebp - 0x34]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x42101a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x42101a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0042b893
add esp, 8
mov ecx, dword [edi]
push 0
push 0x80
push 2
push 2
push 0x40000000
push ecx
call fcn.00418d60
test eax, eax
je 0x421165
mov eax, dword [edi + 4]
sub esp, 8
mov ecx, dword [edi]
push dword [ebp + 0xc]
push dword [eax + 8]
call fcn.00418e40
test eax, eax
je 0x421186
mov ecx, esi
call fcn.004183b0
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
call fcn.00420c10
mov byte [ebp - 4], 6
cmp dword [eax + 0x14], 7
jbe 0x42107d
mov eax, dword [eax]
push eax
push str.Successfully_extracted_and_saved_mouse_and_keyboard_settings_to__ws.zmk__r_n
push 0x4aa657
push esi
call fcn.00418430
mov ecx, dword [ebp - 0x40]
add esp, 0x10
cmp ecx, 7
jbe 0x421116
mov edx, dword [ebp - 0x54]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4210c3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4210c3
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0042b893
add esp, 8
jmp 0x421116
mov esi, dword [edi]
mov eax, dword [esi + 0x2c]
cmp eax, 0xffffffff
je 0x421137
push eax
call dword [sym.imp.KERNEL32.dll_CancelIo]
push dword [esi + 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x2c], 0xffffffff
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
lea ecx, [ebp - 0x7c]
call fcn.004211c0
push 0x43dd08
mov eax, ecx
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
call fcn.00402390
push str.An_error_occured_while_creating_the_MkFile.
lea ecx, [ebp - 0x94]
call fcn.00402600
push 0x43dcb8
lea eax, [ebp - 0x94]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.An_error_occured_while_writing_to_the_MkFile.
lea ecx, [ebp - 0xac]
call fcn.00402600
push 0x43dcb8
lea eax, [ebp - 0xac]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3