Function at 0x407a20
Capabilities:
Delete file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x42f060]
xor eax, ebp
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x228], ecx
mov eax, dword [ebp - 0x228]
movzx ecx, byte [eax + 0x218]
test ecx, ecx
je 0x407a61
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push 0x42a124
call fcn.00413880
add esp, 0xc
jmp 0x407a76
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.KCPROFKXP::OpenKxpFile____s___d_n
call fcn.004139d0
add esp, 0xc
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x1058], ecx
mov edx, dword [ebp + 0xc]
and edx, 2
je 0x407b50
mov eax, dword [ebp - 0x228]
movzx ecx, byte [eax + 0x218]
test ecx, ecx
je 0x407acc
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x228]
mov dword [ecx + 0x1050], eax
jmp 0x407af4
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x228]
mov dword [ecx + 0x1050], eax
mov edx, dword [ebp - 0x228]
cmp dword [edx + 0x1050], 0xffffffff
jne 0x407b1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenFile_error___ld_n
call fcn.00413880
add esp, 8
xor al, al
jmp 0x4081b7
mov dword [ebp - 4], 0
push 0
lea eax, [ebp - 4]
push eax
push 0x90
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x1054]
push edx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x1050]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp + 0xc]
and edx, 1
je 0x4081b5
mov byte [ebp - 5], 0
mov eax, dword [ebp - 0x228]
movzx ecx, byte [eax + 0x218]
test ecx, ecx
je 0x407b9b
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x228]
mov dword [ecx + 0x1050], eax
jmp 0x407bc3
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x228]
mov dword [ecx + 0x1050], eax
mov edx, dword [ebp - 0x228]
cmp dword [edx + 0x1050], 0xffffffff
je 0x407c1b
mov byte [ebp - 5], 1
mov dword [ebp - 0xc], 0
push 0
lea eax, [ebp - 0xc]
push eax
push 0x90
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x1054]
push edx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x1050]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x1050]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx ecx, byte [ebp - 5]
test ecx, ecx
je 0x407c52
mov edx, dword [ebp + 0xc]
and edx, 4
je 0x407c52
mov eax, dword [ebp - 0x228]
movzx ecx, byte [eax + 0x218]
test ecx, ecx
je 0x407c48
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x407c52
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
movzx ecx, byte [ebp - 5]
test ecx, ecx
je 0x407c66
mov edx, dword [ebp + 0xc]
and edx, 4
je 0x408062
mov eax, dword [ebp - 0x228]
movzx ecx, byte [eax + 0x218]
test ecx, ecx
je 0x407ca1
push 0
push 0x80
push 4
push 0
push 2
push 0x40000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x228]
mov dword [ecx + 0x1050], eax
jmp 0x407cc6
push 0
push 0
push 4
push 0
push 2
push 0x40000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x228]
mov dword [ecx + 0x1050], eax
mov edx, dword [ebp - 0x228]
cmp dword [edx + 0x1050], 0xffffffff
jne 0x407cf0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.KCPROFKXP::OpenKxpFile_1___OpenFileError____ld_n
call fcn.00413880
add esp, 8
xor al, al
jmp 0x4081b7
push 0
push 0
push 0
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x1050]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x10], 0
push 0x429da8
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x1054]
push eax
call fcn.00416a40
add esp, 8
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x1064]
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x1054]
mov dx, word [edx + 0x42]
mov word [ecx + 8], dx
mov ecx, dword [ebp - 0x228]
call fcn.00405290
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x1054]
mov word [edx + 0xa], ax
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x1054]
xor edx, edx
mov word [ecx + 4], dx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x1054]
xor edx, edx
mov word [ecx + 6], dx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x1054]
xor edx, edx
mov word [ecx + 0xe], dx
mov eax, dword [ebp - 0x228]
movsx ecx, byte [eax + 0xe46]
test ecx, ecx
jne 0x407db7
mov ecx, dword [ebp - 0x228]
call fcn.004064d0
mov edx, dword [ebp - 0x228]
cmp dword [edx + 0x107c], 0
je 0x407ffc
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x107c]
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x107c]
mov edx, dword [ecx]
mov ecx, eax
mov eax, dword [edx + 0x20]
call eax
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x22c]
mov eax, dword [edx + 0x220]
call eax
movzx ecx, al
test ecx, ecx
je 0x407ffc
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x107c]
mov ecx, dword [ebp - 0x228]
mov ecx, dword [ecx + 0x107c]
mov edx, dword [eax]
mov eax, dword [edx + 0x20]
call eax
mov dword [ebp - 0x230], eax
push 0x4295b4
mov ecx, dword [ebp - 0x230]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x230]
mov eax, dword [edx + 0x2d4]
call eax
push eax
call fcn.004161c1
add esp, 8
test eax, eax
je 0x407ebd
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x107c]
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x107c]
mov edx, dword [edx]
mov eax, dword [edx + 0x20]
call eax
mov dword [ebp - 0x234], eax
push 0x80
mov ecx, dword [ebp - 0x234]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x234]
mov eax, dword [edx + 0x2d4]
call eax
push eax
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x1054]
add edx, 0x10
push edx
call fcn.00418a6f
add esp, 0xc
jmp 0x407ffa
xor eax, eax
mov word [ebp - 0x220], ax
push 0x206
push 0
lea ecx, [ebp - 0x21e]
push ecx
call fcn.00416110
add esp, 0xc
mov dword [ebp - 0x14], 0
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x107c]
mov ecx, dword [ebp - 0x228]
mov ecx, dword [ecx + 0x107c]
mov edx, dword [eax]
mov eax, dword [edx + 0x20]
call eax
mov dword [ebp - 0x238], eax
lea ecx, [ebp - 0x14]
push ecx
push 0
push str.UniversalModelName
mov edx, dword [ebp - 0x238]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x238]
mov edx, dword [eax + 0x8c]
call edx
movzx eax, al
test eax, eax
jne 0x407fa1
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x107c]
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x107c]
mov edx, dword [edx]
mov eax, dword [edx + 0x20]
call eax
mov dword [ebp - 0x23c], eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x220]
push edx
push str.UniversalModelName
mov eax, dword [ebp - 0x23c]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x23c]
mov eax, dword [edx + 0x8c]
call eax
push 0x80
lea ecx, [ebp - 0x220]
push ecx
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x1054]
add eax, 0x10
push eax
call fcn.00418a6f
add esp, 0xc
jmp 0x407ffa
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x107c]
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x107c]
mov edx, dword [edx]
mov eax, dword [edx + 0x20]
call eax
mov dword [ebp - 0x240], eax
push 0x80
mov ecx, dword [ebp - 0x240]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x240]
mov eax, dword [edx + 0x2d4]
call eax
push eax
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x1054]
add edx, 0x10
push edx
call fcn.00418a6f
add esp, 0xc
jmp 0x408020
mov eax, dword [ebp - 0x228]
add eax, 0xe46
push eax
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x1054]
add edx, 0x10
push edx
call fcn.00416a40
add esp, 8
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x1054]
xor edx, edx
mov word [ecx + 0xc], dx
push 0
lea eax, [ebp - 0x10]
push eax
push 0x90
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x1054]
push edx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x1050]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4081b5
mov edx, dword [ebp - 0x228]
movzx eax, byte [edx + 0x218]
test eax, eax
je 0x40809d
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, dword [ebp - 0x228]
mov dword [edx + 0x1050], eax
jmp 0x4080c5
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x228]
mov dword [ecx + 0x1050], eax
mov edx, dword [ebp - 0x228]
cmp dword [edx + 0x1050], 0xffffffff
je 0x4081a1
mov dword [ebp - 0x224], 0
push 0
lea eax, [ebp - 0x224]
push eax
push 0x90
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x1054]
push edx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x1050]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x1050]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x228]
movzx edx, byte [ecx + 0x218]
test edx, edx
je 0x40815e
push 0
push 0x80
push 3
push 0
push 2
push 0x40000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x228]
mov dword [ecx + 0x1050], eax
jmp 0x408186
push 0
push 0x80
push 3
push 0
push 2
push 0x40000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x228]
mov dword [ecx + 0x1050], eax
push 2
push 0
push 0
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x1050]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4081b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.KCPROFKXP::OpenKxpFile_2___OpenFileError____ld_n
call fcn.00413880
add esp, 8
mov al, 1
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00415aa8
mov esp, ebp
pop ebp
ret 8