Function at 0x401740
Capabilities:
Delete file
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0xa78
mov ax, word [0x428280]
push ebx
push ebp
push esi
push edi
mov word [esp + 0x80], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x82]
mov dword [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp dword [0x426030], 0xffffffff
je 0x401881
lea ecx, [esp + 0x80]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x401881
mov esi, dword [sym.imp.MSVCRT.dll_wcsncat]
push 0x104
lea edx, [esp + 0x84]
push str.Drivers_
push edx
call esi
push 0x104
lea eax, [esp + 0x90]
push 0x426054
push eax
call esi
add esp, 0x18
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [esp + 0x80]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push ecx
call esi
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x24], edi
je 0x401881
push 0x10000
push 0x40
mov dword [esp + 0x28], 0x10000
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x401821
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x401873
mov ebx, dword [esp + 0xa8c]
push 0
push 0x80
push 1
push 0
push 0
push 0xc0000000
push ebx
call esi
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x401891
push 0
push 0x80
push 5
push 0
push 0
push 0xc0000000
push ebx
call esi
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x401891
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0xa78
ret 4
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x288]
lea edx, [esp + 0x288]
rep stosd dword es:[edi], eax
mov eax, dword [0x426030]
push edx
push eax
xor ebx, ebx
call fcn.00401bb0
test eax, eax
je 0x4018cc
mov ecx, dword [0x426030]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
jmp 0x4018d3
mov esi, dword [esp + 0x308]
mov edx, dword [0x426030]
xor edi, edi
push edi
push edi
push edi
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x40192a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
mov eax, dword [esp + 0x18]
push eax
call edi
mov ecx, dword [esp + 0xa8c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [esp + 0x24]
push edx
call edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0xa78
ret 4
cmp esi, edi
jbe 0x4019a0
mov ecx, dword [esp + 0x20]
mov eax, esi
sub eax, ebx
cmp eax, ecx
jae 0x40193e
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x20]
mov edx, dword [0x426030]
lea eax, [esp + 0x14]
push edi
push eax
push ecx
push ebp
push edx
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401a90
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x401a86
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push edi
push ecx
push eax
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401a90
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jne 0x401adf
add ebx, eax
cmp ebx, esi
jb 0x40192e
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x288]
push eax
rep stosd dword es:[edi], eax
mov dword [esp + 0x320], ebx
mov ebx, dword [esp + 0x28]
push ebx
mov dword [esp + 0x290], 0x50414746
mov dword [esp + 0x294], 0x800
mov dword [esp + 0x310], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x324], eax
call fcn.00409250
xor esi, esi
mov edi, 0x10000
mov eax, dword [esp + 0x320]
test eax, eax
jbe 0x401b01
sub eax, esi
cmp eax, edi
jae 0x401a0f
mov edi, eax
lea edx, [esp + 0x14]
push 0
push edx
push edi
push ebp
push ebx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401af3
mov eax, dword [esp + 0x14]
test eax, eax
je 0x401ae9
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push 0
push ecx
push eax
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401af3
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jne 0x401b99
push eax
lea eax, [esp + 0x2c]
push ebp
push eax
call fcn.00409280
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x320]
add esi, edx
cmp esi, eax
jb 0x401a07
jmp 0x401b01
mov dword [esp + 0x10], 0x1e
jmp 0x401aa2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
mov dword [esp + 0x10], eax
je 0x4019a0
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0xa8c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [esp + 0x24]
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0xa78
ret 4
mov dword [esp + 0x10], 0x1d
jmp 0x401aa2
mov dword [esp + 0x10], 0x1e
jmp 0x401b55
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x401b55
push 0x20
lea ecx, [esp + 0x2c]
push 0x426034
push ecx
call fcn.00409280
lea edx, [esp + 0x324]
lea eax, [esp + 0x28]
push edx
push eax
call fcn.00409350
lea ecx, [esp + 0x1c]
push 0
mov esi, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x290]
push 0x800
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401b8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [esp + 0x10], eax
je 0x401b6e
mov esi, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0xa8c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa78
ret 4
cmp dword [esp + 0x1c], 0x800
je 0x401b6e
mov dword [esp + 0x10], 0x1d
jmp 0x401b55