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

Disassembly:
push 0xffffffffffffffff
push 0x425086
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x130
mov eax, dword [0x42f2e4]
mov edx, dword [0x42f2ec]
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 0x20], eax
mov eax, dword [str.RockUsb.inf]
mov ecx, dword [0x42f2e8]
mov dword [esp + 0x14], eax
mov eax, dword [str.CopyFiles]
mov dword [esp + 0x24], ecx
mov ecx, dword [0x42f2dc]
mov dword [esp + 0x28], edx
mov edx, dword [0x42f2e0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x148]
mov dword [esp + 0x18], ecx
mov ecx, dword [0x42f2d0]
mov dword [esp + 0x1c], edx
mov dx, word [0x42f2d4]
push esi
push edi
test ah, 1
mov dword [esp + 0x14], ebp
mov dword [esp + 0x38], ecx
mov word [esp + 0x3c], dx
jne 0x403bac
mov ebx, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [esp + 0x40]
push 0xc8
push eax
call ebx
or ecx, 0xffffffff
mov edi, str.System32drivers
xor eax, eax
lea edx, [esp + 0x40]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x40]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x42f178
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x40]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x28]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x40]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2c]
push ecx
call fcn.00402210
add esp, 8
test eax, eax
jne 0x403923
mov edx, dword [0x42f4c8]
mov dword [esp + 0x18], edx
mov dword [esp + 0x148], eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [ebp + 0x88]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
lea eax, [esp + 0x1c]
lea edx, [ecx*8 + 0xbc4]
push edx
push eax
call fcn.00418ee2
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x160]
add esp, 0xc
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x18]
mov dword [esp + 0x148], 0xffffffff
call fcn.004199c4
xor eax, eax
jmp 0x403bb1
lea eax, [esp + 0x40]
push 0xc8
push eax
call ebx
mov edi, str.inf_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x40]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x40]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x40]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
push ecx
call fcn.00402210
add esp, 8
test eax, eax
jne 0x403a0a
mov edx, dword [0x42f4c8]
mov dword [esp + 0x14], edx
lea eax, [esp + 0x1c]
mov dword [esp + 0x148], 1
push eax
mov eax, dword [ebp + 0x88]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
lea eax, [esp + 0x18]
lea edx, [ecx*8 + 0xbc4]
push edx
push eax
call fcn.00418ee2
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x160]
add esp, 0xc
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x14]
mov dword [esp + 0x148], 0xffffffff
call fcn.004199c4
xor eax, eax
jmp 0x403bb1
lea eax, [esp + 0x40]
push 0x180
push eax
call fcn.0040c97f
add esp, 8
lea ecx, [esp + 0x40]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x18], edi
jne 0x403a70
mov edi, str.Cant_open_rockusb.inf_file_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x154]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x403bb1
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x403a8a
mov edi, str.Cant_process_rockusb.inf_file_r_n
jmp 0x403a49
push esi
call fcn.0040ca06
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x403ac5
mov edi, str.Cant_process_rockusb.inf_file_r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x154]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x403bb1
lea ecx, [esp + 0x10]
push 0
push ecx
push esi
push ebx
push edi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403b02
mov edi, str.Cant_read_rockusb.inf_file_r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x154]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
jmp 0x403b8a
xor ebp, ebp
test esi, esi
jbe 0x403b3a
xor eax, eax
lea edi, [eax + ebx]
mov al, byte [eax + ebx]
cmp al, 0x43
jne 0x403b2a
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x34]
push edi
push eax
call fcn.00402ad0
test eax, eax
je 0x403b2a
mov byte [edi], 0x3b
inc ebp
mov eax, ebp
and eax, 0xffff
cmp eax, esi
jb 0x403b0a
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0
push ecx
push 0
push edi
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x10]
push 0
push edx
push esi
push ebx
push edi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403b9c
mov edi, str.Cant_write_rockusb.inf_file_r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x154]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
call fcn.0040c9be
add esp, 4
xor eax, eax
jmp 0x403bb1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.0040c9be
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x140]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x13c
ret 8