Function at 0x1000cd55
Capabilities:
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
mov eax, 0x100d67a0
lea ecx, [ebp - 0x48]
mov dx, word [eax]
mov word [ecx], dx
mov al, byte [eax + 2]
mov byte [ecx + 2], al
mov esi, str.device_SystemRoot__system32haspdos.sys
lea edi, [ebp - 0x44]
mov ecx, 0xa
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
push 0x2710
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x101436ec], eax
cmp dword [0x101436ec], 0
jne 0x1000cdb5
push 5
call fcn.100042e2
add esp, 4
mov eax, 0xffffffff
jmp 0x1000d4b6
push 0x200
push 0x101434e0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x100d67d0
push 0x101434e0
call fcn.1001bc40
add esp, 8
push 0x101434e0
push 0x10142a60
call fcn.1001bc30
add esp, 8
push 0x100d67d4
push 0x101434e0
call fcn.1001bc40
add esp, 8
push str.config.hsp
push 0x10142a60
call fcn.1001bc40
add esp, 8
cmp dword [ebp + 8], 0
jne 0x1000ce2b
push 0
push 0x10142a60
push 0x101434e0
call fcn.10006020
add esp, 0xc
push 0
push pe_nt_image_headers32
push 4
push 0
push 1
push 0x80000000
push 0x101434e0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x101436e0], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1000ce66
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [0x101436e0], 0xffffffff
jne 0x1000ce96
push 0x40003
call fcn.100042e2
add esp, 4
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xffffffff
jmp 0x1000d4b6
push 0
lea eax, [ebp - 8]
push eax
push 0x270f
mov eax, dword [0x101436ec]
push eax
mov eax, dword [0x101436e0]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x1000ceef
push 0x4000a
call fcn.100042e2
add esp, 4
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [0x101436e0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
jmp 0x1000d4b6
mov eax, dword [0x101436e0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1000cf26
push 0x40005
call fcn.100042e2
add esp, 4
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xffffffff
jmp 0x1000d4b6
mov dword [ebp - 4], 1
mov dword [ebp - 0x14], 0
jmp 0x1000cf3c
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 8], eax
jbe 0x1000cfc3
cmp dword [ebp - 4], 1
jne 0x1000cfc3
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
xor edx, edx
mov dl, byte [eax + ecx]
movsx eax, byte [0x100d61b8]
cmp edx, eax
jne 0x1000cfbe
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
jmp 0x1000cf85
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0xb
jae 0x1000cfbe
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
xor edx, edx
mov dl, byte [eax + ecx]
mov eax, dword [ebp - 0x18]
movsx eax, byte [eax + 0x100d61b8]
cmp edx, eax
je 0x1000cfb9
mov dword [ebp - 4], 1
jmp 0x1000cf82
jmp 0x1000cf39
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 8], eax
jne 0x1000d1b9
cmp dword [ebp - 4], 1
jne 0x1000d1b9
cmp dword [ebp + 8], 0
jne 0x1000d1a1
mov eax, dword [ebp - 8]
mov ecx, dword [0x101436ec]
xor edx, edx
mov dl, byte [eax + ecx - 1]
cmp edx, 0x1a
jne 0x1000d003
dec dword [ebp - 8]
jmp 0x1000d023
mov eax, dword [ebp - 8]
mov ecx, dword [0x101436ec]
mov byte [eax + ecx], 0xd
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [0x101436ec]
mov byte [eax + ecx], 0xa
inc dword [ebp - 8]
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
jmp 0x1000d03b
inc dword [ebp - 0x14]
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cl, byte [ebp + eax - 0x44]
test ecx, ecx
je 0x1000d064
mov eax, dword [ebp - 0x18]
mov al, byte [ebp + eax - 0x44]
mov ecx, dword [ebp - 0x14]
mov edx, dword [0x101436ec]
mov byte [ecx + edx], al
jmp 0x1000d035
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
mov byte [eax + ecx], 0xd
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
mov byte [eax + ecx + 1], 0xa
push 0x200
push 0x101434e0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x100d67ec
push 0x101434e0
call fcn.1001bc40
add esp, 8
push 0x100d67f0
push 0x101434e0
call fcn.1001bc40
add esp, 8
push 0
push pe_nt_image_headers32
push 4
push 0
push 0
push 0xc0000000
push 0x101434e0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x101436e0], eax
cmp dword [0x101436e0], 0xffffffff
jne 0x1000d105
push 0x40003
call fcn.100042e2
add esp, 4
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xffffffff
jmp 0x1000d4b6
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x14]
inc eax
push eax
mov eax, dword [0x101436ec]
push eax
mov eax, dword [0x101436e0]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x1000d152
push 0x40004
call fcn.100042e2
add esp, 4
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xffffffff
jmp 0x1000d4b6
mov eax, dword [0x101436e0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1000d189
push 0x40005
call fcn.100042e2
add esp, 4
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xffffffff
jmp 0x1000d4b6
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1000d4b6
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1000d4b6
dec dword [ebp - 0x14]
jmp 0x1000d1c4
dec dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
xor edx, edx
mov dl, byte [eax + ecx]
cmp edx, 0xa
je 0x1000d1e0
jmp 0x1000d1c1
inc dword [ebp - 0x14]
jmp 0x1000d1eb
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
xor edx, edx
mov dl, byte [eax + ecx]
cmp edx, 0x14
jne 0x1000d207
jmp 0x1000d1e8
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
jmp 0x1000d21d
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 3
jae 0x1000d27a
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
xor edx, edx
mov dl, byte [eax + ecx]
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cl, byte [ebp + eax - 0x48]
cmp edx, ecx
je 0x1000d275
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
xor edx, edx
mov dl, byte [eax + ecx]
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cl, byte [ebp + eax - 0x48]
sub ecx, 0x20
cmp edx, ecx
je 0x1000d275
mov dword [ebp - 4], 1
jmp 0x1000d21a
cmp dword [ebp - 4], 1
jne 0x1000d2c3
cmp dword [ebp + 8], 1
jne 0x1000d2c3
mov eax, dword [0x101436ec]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0x14]
push eax
call fcn.1000d4bb
add esp, 0xc
cmp eax, 0xffffffff
jne 0x1000d2c3
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xffffffff
jmp 0x1000d4b6
cmp dword [ebp - 4], 1
jne 0x1000d2ea
cmp dword [ebp + 8], 0
jne 0x1000d2ea
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1000d4b6
cmp dword [ebp - 4], 0
jne 0x1000d311
cmp dword [ebp + 8], 1
jne 0x1000d311
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1000d4b6
cmp dword [ebp - 4], 0
jne 0x1000d4a3
cmp dword [ebp + 8], 0
jne 0x1000d4a3
jmp 0x1000d32d
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 8], eax
jbe 0x1000d357
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
mov al, byte [eax + ecx + 4]
mov ecx, dword [ebp - 0x14]
mov edx, dword [0x101436ec]
mov byte [ecx + edx], al
jmp 0x1000d32a
sub dword [ebp - 0x14], 4
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
mov byte [eax + ecx], 0xd
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x101436ec]
mov byte [eax + ecx + 1], 0xa
add dword [ebp - 0x14], 2
push 0x200
push 0x101434e0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x100d67fc
push 0x101434e0
call fcn.1001bc40
add esp, 8
push 0x100d6800
push 0x101434e0
call fcn.1001bc40
add esp, 8
push 0x101434e0
call fcn.10005ffa
add esp, 4
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0xc0000000
push 0x101434e0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x101436e0], eax
cmp dword [0x101436e0], 0xffffffff
jne 0x1000d40d
push 0x40003
call fcn.100042e2
add esp, 4
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xffffffff
jmp 0x1000d4b6
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [0x101436ec]
push eax
mov eax, dword [0x101436e0]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x1000d459
push 0x40003
call fcn.100042e2
add esp, 4
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xffffffff
jmp 0x1000d4b6
mov eax, dword [0x101436e0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1000d490
push 0x40005
call fcn.100042e2
add esp, 4
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xffffffff
jmp 0x1000d4b6
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1000d4b6
mov eax, dword [0x101436ec]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1000d4b6
pop edi
pop esi
pop ebx
leave
ret