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

Disassembly:
push 0xffffffffffffffff
push 0x598cfa
mov eax, dword fs:[0]
push eax
sub esp, 0xac8
mov eax, dword [0x61e69c]
xor eax, esp
mov dword [esp + 0xac4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0xadc]
mov dword fs:[0], eax
mov eax, dword [esp + 0xaec]
push eax
mov dword [esp + 0x38], eax
call fcn.0047ace0
lea eax, [esp + 0x18]
push eax
mov ecx, 0x5d74e0
call fcn.004066b0
xor ebx, ebx
push 6
push ebx
push ebx
push ebx
mov dword [esp + 0xaf4], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x479fd4
mov dword [esp + 0xae4], eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x479fcd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x47a888
lea ecx, [esp + 0x40]
push ecx
push ebx
push ebp
mov dword [esp + 0x4c], 0x1c
mov dword [esp + 0x34], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x47a2a2
lea edx, [esp + 0x3c]
push edx
push 0x208
lea eax, [esp + 0x8d8]
push eax
lea ecx, [esp + 0x4c]
push ecx
push ebp
mov dword [esp + 0x50], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
test eax, eax
je 0x47a245
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x8d4]
call fcn.004066b0
mov eax, 8
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x14]
mov byte [esp + 0xae4], 1
call fcn.004098d0
mov byte [esp + 0xae4], 2
mov esi, dword [esp + 0x2c]
mov ecx, str.USBVID_
mov eax, esi
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x47a086
cmp dx, bx
je 0x47a082
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x47a086
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x47a060
xor eax, eax
jmp 0x47a08b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
setne al
test al, al
jne 0x47a1d9
mov eax, dword [esp + 0x14]
cmp dword [eax - 0xc], ebx
jl 0x47a1d9
push str.PID_
push eax
call fcn.004f7373
add esp, 8
cmp eax, ebx
je 0x47a1d9
mov ecx, dword [esp + 0x14]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x47a1d9
push 0x5c
push ecx
call fcn.004f7f30
add esp, 8
cmp eax, ebx
je 0x47a1d9
sub eax, dword [esp + 0x14]
sar eax, 1
cmp eax, 0xffffffff
je 0x47a1d9
lea ecx, [esp + 0x30]
push ecx
mov ecx, 0x5d74e0
mov dword [esp + 0x28], ebx
call fcn.004066b0
lea edx, [esp + 0x24]
push edx
push 0x208
lea eax, [esp + 0x6d0]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 2
lea edx, [esp + 0x54]
push edx
push ebp
mov byte [esp + 0xb00], 3
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
je 0x47a1b1
cmp dword [esp + 0x24], ebx
jbe 0x47a1b1
lea eax, [esp + 0x6c8]
push eax
call fcn.004f84aa
push str.usbclass_ffsubclass_42
push eax
call fcn.004f7373
add esp, 0xc
test eax, eax
je 0x47a1b1
mov ecx, dword [esp + 0x34]
mov eax, dword [ecx]
sub eax, 0x10
call fcn.004073f0
add eax, 0x10
mov dword [esp + 0x1c], eax
lea edi, [esp + 0x1c]
mov byte [esp + 0xae4], 4
call fcn.0042ca00
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x47a1a8
mov ecx, dword [esp + 0x14]
cmp dword [ecx - 0xc], ebx
jl 0x47a1a8
push eax
push ecx
call fcn.004f7373
add esp, 8
cmp eax, ebx
je 0x47a1a8
sub eax, dword [esp + 0x14]
sar eax, 1
jns 0x47a269
lea ecx, [esp + 0x1c]
call fcn.00406760
mov byte [esp + 0xae4], 2
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x47a1d9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0xae4], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a1fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xae4], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a225
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x40]
inc eax
push ecx
push eax
push ebp
mov dword [esp + 0x34], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x479ff5
jmp 0x47a2a2
mov dword [esp + 0xae4], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x479fc1
lea eax, [esp + 0x14]
lea edi, [esp + 0x18]
call fcn.00406fe0
lea ecx, [esp + 0x1c]
call fcn.00406760
lea ecx, [esp + 0x30]
call fcn.00406760
lea ecx, [esp + 0x2c]
call fcn.00406760
lea ecx, [esp + 0x14]
mov byte [esp + 0xae4], 0
call fcn.00406760
push ebp
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], ebx
jne 0x47a2c2
mov dword [esp + 0xae4], 0xffffffff
jmp 0x47a867
push 0x5c
push eax
call fcn.004f7f30
mov ecx, dword [esp + 0x20]
add esp, 8
cmp eax, ebx
je 0x47a2db
sub eax, ecx
sar eax, 1
jns 0x47a2ee
mov dword [esp + 0xae4], 0xffffffff
lea eax, [ecx - 0x10]
jmp 0x479fb4
lea ecx, [esp + 0x34]
lea edx, [esp + 0x18]
call fcn.004098d0
lea edi, [esp + 0x18]
mov byte [esp + 0xae4], 5
call fcn.00406fe0
mov byte [esp + 0xae4], 0
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a334
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x206
lea edx, [esp + 0x4c6]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x4cc], cx
call fcn.004fe380
add esp, 0xc
push 0x104
lea eax, [esp + 0x4c4]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov edx, dword [0x6285c4]
mov eax, dword [edx + 0xc]
mov ecx, 0x6285c4
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x4c0]
push ecx
push str._sinf.
lea edi, [esp + 0x2c]
mov byte [esp + 0xaec], 6
call fcn.00407710
mov edx, 0x5c
add esp, 8
mov word [esp + 0x4b4], dx
mov dword [esp + 0x4b8], ebx
mov dword [esp + 0x4bc], ebx
mov byte [esp + 0xae4], 7
mov eax, dword [esp + 0x24]
lea esi, [esp + 0x5c]
call fcn.0043e9b0
cmp eax, ebx
je 0x47a80b
mov eax, dword [esp + 0x4b8]
cmp eax, ebx
jne 0x47a3ef
mov eax, dword [esp + 0x4bc]
mov dword [esp + 0x28], ebx
jmp 0x47a415
cmp dword [esp + 0x4bc], ebx
jne 0x47a3fe
mov dword [esp + 0x28], ebx
jmp 0x47a45d
lea ecx, [esp + 0x5c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov dword [esp + 0x4bc], eax
mov dword [esp + 0x28], eax
cmp eax, ebx
je 0x47a45d
mov eax, dword [esp + 0x5c]
shr eax, 4
and eax, 1
je 0x47a455
cmp word [esp + 0x88], 0x2e
jne 0x47a455
mov cx, word [esp + 0x8a]
cmp cx, bx
je 0x47a801
cmp cx, 0x2e
jne 0x47a455
cmp word [esp + 0x8c], bx
je 0x47a801
cmp eax, ebx
jne 0x47a801
mov edx, dword [0x6285c4]
mov eax, dword [edx + 0xc]
mov ecx, 0x6285c4
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x60]
mov byte [esp + 0xae8], 8
call fcn.0043e7c0
mov byte [esp + 0xae4], 9
mov edx, dword [eax]
push edx
lea eax, [esp + 0x4c4]
push eax
push str._sinf_s
lea edi, [esp + 0x20]
call fcn.00407710
mov byte [esp + 0xaf0], 8
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a4d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x14]
mov edi, dword [esi - 0xc]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x47a4fd
mov ecx, edi
lea eax, [esp + 0x14]
call fcn.004073a0
mov esi, dword [esp + 0x14]
lea ecx, [edi + 1]
push ecx
push esi
call fcn.004f8c9d
add esp, 8
cmp edi, ebx
jl 0x47a8b2
cmp edi, dword [esi - 8]
jg 0x47a8b2
xor edx, edx
mov dword [esi - 0xc], edi
mov word [esi + edi*2], dx
cmp dword [esi - 0xc], ebx
jl 0x47a7db
push str..INF
push esi
call fcn.004f7373
add esp, 8
test eax, eax
je 0x47a7db
sub eax, esi
sar eax, 1
js 0x47a7db
xor ebx, ebx
cmp dword [esi - 0xc], ebx
jl 0x47a7db
push str.USB.INF
push esi
call fcn.004f7373
add esp, 8
cmp eax, ebx
je 0x47a570
sub eax, esi
sar eax, 1
jns 0x47a59b
cmp dword [esi - 0xc], ebx
jl 0x47a7db
push 0x5f2ecc
push esi
call fcn.004f7373
add esp, 8
test eax, eax
je 0x47a7db
sub eax, esi
sar eax, 1
js 0x47a7db
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push bind
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x47a5e5
add esi, 0xfffffff0
mov byte [esp + 0xae4], 7
lea eax, [esi + 0xc]
or ecx, ebp
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47a7ff
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
jmp 0x47a801
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [0x6285c4]
mov edi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x6285c4
mov dword [esp + 0x2c], 0
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
push 4
push 0x1000
lea ecx, [edi + 1]
push ecx
push 0
mov byte [esp + 0xaf4], 0xa
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
je 0x47a68d
push 0
lea edx, [esp + 0x30]
push edx
push edi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x47a67f
mov eax, dword [esp + 0x2c]
cmp eax, edi
jne 0x47a67f
mov byte [ebx + eax], 0
lea eax, [esp + 0x3c]
push eax
call fcn.0041a110
add esp, 4
lea edi, [esp + 0x1c]
mov byte [esp + 0xae4], 0xb
call fcn.00406fe0
lea ecx, [esp + 0x3c]
mov byte [esp + 0xae4], 0xa
call fcn.00406760
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
test eax, eax
je 0x47a7b7
cmp dword [ebp - 0xc], 0
jl 0x47a7b7
push eax
push ebp
call fcn.004f7373
add esp, 8
test eax, eax
je 0x47a7b7
sub eax, ebp
sar eax, 1
js 0x47a7b7
push esi
xor ebx, ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea ecx, [esp + 0x38]
push ecx
mov ecx, eax
call fcn.004066b0
push str.setupapi.dll
mov byte [esp + 0xae8], 0xc
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x47a726
push str.SetupUninstallOEMInf
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x47a71b
mov edx, dword [esp + 0x38]
push ebx
push 1
push edx
call eax
test eax, eax
je 0x47a71b
mov ebx, 1
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
jne 0x47a78f
push ecx
lea ebx, [esi - 0x10]
mov eax, ebx
mov dword [esp + 0x24], esp
mov edi, esp
call fcn.004073f0
add eax, 0x10
mov dword [edi], eax
call fcn.0047a8c0
mov eax, dword [esi - 0xc]
add eax, 0xfffffffd
lea ecx, [esp + 0x30]
lea edx, [esp + 0x14]
call fcn.004098d0
mov edx, 0x5f2f5c
lea edi, [esp + 0x30]
mov byte [esp + 0xae4], 0xd
call fcn.00409860
push ecx
mov eax, ebx
mov dword [esp + 0x24], esp
mov edi, esp
call fcn.004073f0
add eax, 0x10
mov dword [edi], eax
call fcn.0047a8c0
lea ecx, [esp + 0x30]
call fcn.00406760
mov ebp, dword [esp + 0x1c]
mov byte [esp + 0xae4], 0xa
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a7b7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0xae4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a7db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov byte [esp + 0xae4], 7
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a7ff
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
xor ebx, ebx
cmp dword [esp + 0x28], ebx
jne 0x47a3d7
mov eax, dword [esp + 0x4b8]
mov dword [esp + 0x4bc], ebx
cmp eax, ebx
je 0x47a830
cmp eax, 0xffffffff
je 0x47a830
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x4b8], ebx
mov byte [esp + 0xae4], 0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a858
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xae4], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a883
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0xadc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xac4]
xor ecx, esp
call fcn.004f673f
add esp, 0xad4
ret 4
push 0x80070057
call fcn.00401050
int3