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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5a08c3
mov eax, dword fs:[0]
push eax
sub esp, 0x768
mov eax, dword [0x61e69c]
xor eax, esp
mov dword [esp + 0x760], eax
push ebx
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x778]
mov dword fs:[0], eax
mov edi, ecx
push edi
mov dword [esp + 0x18], edi
call fcn.0047ace0
mov ecx, edi
call fcn.0047a950
test eax, eax
jne 0x47984a
push eax
push eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.SETUPAPI.dll_CM_Locate_DevNodeW]
test eax, eax
je 0x47982f
xor eax, eax
jmp 0x479efa
mov ecx, dword [esp + 0x28]
push 0
push ecx
call dword [sym.imp.SETUPAPI.dll_CM_Reenumerate_DevNode]
test eax, eax
jne 0x479828
call fcn.0047b1e0
jmp 0x479ef5
lea edx, [esp + 0x34]
xor esi, esi
push edx
mov dword [esp + 0x20], esi
call fcn.0040d5c0
mov dword [esp + 0x780], esi
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax + 4]
push ecx
lea ecx, [esp + 0x38]
call fcn.0047cc60
mov eax, dword [esp + 0x4c]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x50], esi
mov dword [eax], eax
mov eax, dword [esp + 0x4c]
mov dword [eax + 8], eax
mov eax, dword [edi + 0x24]
mov ebx, dword [eax]
mov esi, dword [edi + 0xc]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], esi
lea ebx, [ebx]
mov edx, dword [edi + 0x24]
mov edi, dword [edi + 0xc]
mov dword [esp + 0x58], edx
test esi, esi
je 0x4798b2
cmp esi, edi
je 0x4798b7
call fcn.004f825e
cmp ebx, dword [esp + 0x58]
je 0x4799a7
test esi, esi
jne 0x479995
call fcn.004f825e
xor eax, eax
cmp ebx, dword [eax + 0x18]
jne 0x4798da
call fcn.004f825e
mov eax, dword [ebx + 0xc]
push ecx
sub eax, 0x10
mov dword [esp + 0x34], esp
mov edi, esp
call fcn.004073f0
add eax, 0x10
mov dword [edi], eax
lea edi, [esp + 0x1c]
call fcn.0047b210
mov byte [esp + 0x780], 1
test esi, esi
jne 0x47999c
call fcn.004f825e
xor eax, eax
cmp ebx, dword [eax + 0x18]
jne 0x47991b
call fcn.004f825e
lea eax, [esp + 0x18]
push eax
lea ebx, [esp + 0x38]
call fcn.0047c850
mov edi, dword [esp + 0x24]
mov ecx, dword [edi + 0x10]
mov dword [eax], ecx
test esi, esi
jne 0x4799a3
call fcn.004f825e
cmp edi, dword [esi + 0x18]
jne 0x479945
call fcn.004f825e
mov eax, 1
cmp dword [edi + 0x10], eax
je 0x479953
mov dword [esp + 0x1c], eax
mov byte [esp + 0x780], 0
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
jg 0x47997b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x20]
call fcn.00462d80
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
jmp 0x4798a0
mov eax, dword [esi]
jmp 0x4798d0
mov eax, dword [esi]
jmp 0x479911
mov esi, dword [esi]
jmp 0x47993b
cmp dword [esp + 0x1c], 0
je 0x479ed4
push 0x206
xor ebx, ebx
lea edx, [esp + 0x56a]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x570], cx
call fcn.004fe380
add esp, 0xc
push 0x104
lea eax, [esp + 0x568]
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 + 0x18], eax
lea ecx, [esp + 0x564]
push ecx
push str._sinf.
lea edi, [esp + 0x20]
mov byte [esp + 0x788], 2
call fcn.00407710
mov edx, 0x5c
add esp, 8
mov word [esp + 0x554], dx
mov dword [esp + 0x558], ebx
mov dword [esp + 0x55c], ebx
mov byte [esp + 0x780], 3
mov eax, dword [esp + 0x18]
lea esi, [esp + 0xfc]
call fcn.0043e9b0
cmp eax, ebx
je 0x479e87
lea ebx, [ebx]
mov eax, dword [esp + 0x558]
xor esi, esi
cmp eax, esi
jne 0x479a7a
mov eax, dword [esp + 0x55c]
mov dword [esp + 0x1c], esi
jmp 0x479aa3
cmp dword [esp + 0x55c], esi
jne 0x479a89
mov dword [esp + 0x1c], esi
jmp 0x479aef
lea ecx, [esp + 0xfc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov dword [esp + 0x55c], eax
mov dword [esp + 0x1c], eax
cmp eax, esi
je 0x479aef
mov eax, dword [esp + 0xfc]
shr eax, 4
and eax, 1
je 0x479ae7
cmp word [esp + 0x128], 0x2e
jne 0x479ae7
mov cx, word [esp + 0x12a]
cmp cx, si
je 0x479e7a
cmp cx, 0x2e
jne 0x479ae7
cmp word [esp + 0x12c], 0
je 0x479e7a
test eax, eax
jne 0x479e7a
mov edx, dword [0x6285c4]
mov eax, dword [edx + 0xc]
mov ecx, 0x6285c4
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x100]
mov byte [esp + 0x784], 4
call fcn.0043e7c0
mov byte [esp + 0x780], 5
mov edx, dword [eax]
push edx
lea eax, [esp + 0x568]
push eax
push str._sinf_s
lea edi, [esp + 0x38]
call fcn.00407710
mov byte [esp + 0x78c], 4
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x479b6b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x2c]
mov esi, dword [ebx - 0xc]
mov eax, dword [ebx - 8]
mov ecx, 1
sub ecx, dword [ebx - 4]
sub eax, esi
or eax, ecx
jge 0x479b92
mov ecx, esi
lea eax, [esp + 0x2c]
call fcn.004073a0
mov ebx, dword [esp + 0x2c]
lea ecx, [esi + 1]
push ecx
push ebx
call fcn.004f8c9d
add esp, 8
test esi, esi
jl 0x479f1e
cmp esi, dword [ebx - 8]
jg 0x479f1e
xor edx, edx
mov dword [ebx - 0xc], esi
mov word [ebx + esi*2], dx
cmp dword [ebx - 0xc], edx
jl 0x479e56
push str..INF
push ebx
call fcn.004f7373
add esp, 8
test eax, eax
je 0x479e56
sub eax, ebx
sar eax, 1
js 0x479e56
cmp dword [ebx - 0xc], 0
jl 0x479e56
push str.USB.INF
push ebx
call fcn.004f7373
add esp, 8
test eax, eax
je 0x479c04
sub eax, ebx
sar eax, 1
jns 0x479c2e
cmp dword [ebx - 0xc], 0
jl 0x479e56
push 0x5f2ecc
push ebx
call fcn.004f7373
add esp, 8
test eax, eax
je 0x479e56
sub eax, ebx
sar eax, 1
js 0x479e56
push 0
push 0x80
push 3
push 0
push 1
push bind
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x479e56
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 4
mov edi, eax
push 0x1000
lea ecx, [edi + 1]
push ecx
push 0
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esp + 0x14], eax
test eax, eax
je 0x479ca4
push 0
lea edx, [esp + 0x2c]
push edx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x479ca4
mov eax, dword [esp + 0x28]
cmp eax, edi
jne 0x479ca4
mov ecx, dword [esp + 0x14]
mov byte [ecx + eax], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x4c]
mov edi, dword [edx]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x4c]
test eax, eax
je 0x479cd2
cmp eax, dword [esp + 0x34]
je 0x479cdb
call fcn.004f825e
mov eax, dword [esp + 0x20]
cmp edi, esi
je 0x479e44
test eax, eax
jne 0x479e32
call fcn.004f825e
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x479cfc
call fcn.004f825e
mov eax, dword [edi + 0xc]
push 3
lea ecx, [esp + 0x64]
push eax
lea eax, [esp + 0x64]
mov dword [esp + 0x64], ecx
call fcn.004106a0
mov byte [esp + 0x780], 6
mov edx, dword [esp + 0x5c]
mov eax, edx
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], 0
mov byte [esp + 0xe4], 0
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x479d42
sub eax, esi
push eax
push edx
lea ecx, [esp + 0xe8]
call fcn.00409ea0
mov byte [esp + 0x780], 8
mov eax, dword [esp + 0x5c]
lea edx, [esp + 0x60]
cmp eax, edx
je 0x479d76
push eax
call fcn.004f6d01
add esp, 4
mov esi, dword [esp + 0x20]
test esi, esi
jne 0x479e39
call fcn.004f825e
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x479d93
call fcn.004f825e
cmp dword [edi + 0x10], 1
je 0x479dfe
cmp dword [esp + 0xf8], 0x10
mov eax, dword [esp + 0xe4]
jae 0x479db1
lea eax, [esp + 0xe4]
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.004f9c50
add esp, 8
test eax, eax
je 0x479dfe
test esi, esi
jne 0x479e40
call fcn.004f825e
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x479dd8
call fcn.004f825e
mov eax, dword [edi + 0xc]
push eax
push ecx
lea eax, [ebx - 0x10]
mov dword [esp + 0x5c], esp
mov esi, esp
call fcn.004073f0
add eax, 0x10
mov dword [esi], eax
call fcn.0047b0d0
test eax, eax
je 0x479dfe
call fcn.0047b1e0
mov byte [esp + 0x780], 4
cmp dword [esp + 0xf8], 0x10
jb 0x479e20
mov ecx, dword [esp + 0xe4]
push ecx
call fcn.004f6734
add esp, 4
lea esi, [esp + 0x20]
call fcn.00462d80
mov edi, dword [esp + 0x24]
jmp 0x479cc0
mov eax, dword [eax]
jmp 0x479cf2
mov eax, dword [esi]
jmp 0x479d89
mov eax, dword [esi]
jmp 0x479dce
mov edx, dword [esp + 0x14]
push 0x8000
push 0
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea eax, [ebx - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x780], 3
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x479e7a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x1c], 0
jne 0x479a60
xor ebx, ebx
mov eax, dword [esp + 0x558]
mov dword [esp + 0x55c], ebx
cmp eax, ebx
je 0x479eac
cmp eax, 0xffffffff
je 0x479eac
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x558], ebx
mov byte [esp + 0x780], 0
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 0x479ed4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x34]
mov dword [esp + 0x780], 9
call fcn.0047ccc0
mov ecx, dword [esp + 0x34]
push ecx
call fcn.004f6734
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x778]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x760]
xor ecx, esp
call fcn.004f673f
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00401050
int3