Function at 0x47c040
Capabilities:
Check if file exists
Create directory
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x598c42
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
lea eax, [esp + 0x1c]
xor ebp, ebp
push eax
mov ecx, 0x5d74e0
mov dword [esp + 0x24], ebp
call fcn.004066b0
lea ecx, [esp + 0x18]
push ecx
mov ecx, 0x5d74e0
mov dword [esp + 0x40], ebp
call fcn.004066b0
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x44], 1
call fcn.0047c470
test eax, eax
jne 0x47c0fb
mov byte [esp + 0x3c], 0
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 0x47c0cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x3c], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47c0f4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x47c452
call fcn.0041a070
lea ecx, [esp + 0x14]
push ecx
mov ecx, eax
call fcn.004066b0
push 5
push str.drv_
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0x48], 2
call fcn.00409a20
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call esi
test eax, eax
je 0x47c142
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x47c14e
mov edx, dword [esp + 0x14]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, dword [esp + 0x44]
lea eax, [esp + 0x14]
call fcn.00406fe0
push 7
push str.usb.inf
push edi
call fcn.00409a20
mov eax, dword [edi]
push eax
call esi
test eax, eax
je 0x47c1ce
mov eax, dword [edi]
push ecx
sub eax, 0x10
mov dword [esp + 0x24], esp
mov esi, esp
call fcn.004073f0
add eax, 0x10
mov dword [esi], eax
lea eax, [esp + 0x28]
push eax
call fcn.0049c799
add esp, 8
mov byte [esp + 0x3c], 3
mov edx, dword [esp + 0x18]
xor ecx, ecx
cmp edx, ebp
setne cl
mov dword [esp + 0x20], 1
cmp ecx, ebp
jne 0x47c1ba
push 0x80004005
call fcn.00401050
mov eax, dword [eax]
push edx
push eax
call fcn.004f69f9
add esp, 8
cmp eax, ebp
jne 0x47c1ce
mov bl, 1
jmp 0x47c1d0
xor bl, bl
mov dword [esp + 0x3c], 2
test byte [esp + 0x20], 1
je 0x47c204
mov eax, dword [esp + 0x24]
and dword [esp + 0x20], 0xfffffffe
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47c204
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x47c283
mov byte [esp + 0x3c], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47c22d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x3c], 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 0x47c252
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x3c], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47c44d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x47c44d
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
call fcn.004073f0
add eax, 0x10
mov dword [esp + 0x24], eax
push 0xa
push str.usbinf.cab
lea ecx, [esp + 0x2c]
mov bl, 4
push ecx
mov byte [esp + 0x48], bl
call fcn.00409a20
mov edi, dword [esp + 0x24]
push 0x7530
push ecx
lea esi, [edi - 0x10]
mov eax, esi
mov dword [esp + 0x30], esp
mov ebp, esp
call fcn.004073f0
add eax, 0x10
mov dword [ebp], eax
mov byte [esp + 0x44], 5
mov eax, dword [esp + 0x1c]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x38], esp
mov ebp, esp
call fcn.004073f0
add eax, 0x10
mov dword [ebp], eax
mov byte [esp + 0x48], 6
mov eax, dword [esp + 0x28]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x40], esp
mov ebp, esp
call fcn.004073f0
add eax, 0x10
mov dword [ebp], eax
mov byte [esp + 0x4c], bl
call fcn.004a0813
add esp, 0x10
test eax, eax
jne 0x47c365
mov byte [esp + 0x3c], 2
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x47c337
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov byte [esp + 0x3c], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47c0a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x47c0a7
test edi, edi
je 0x47c384
mov eax, dword [esp + 0x14]
test eax, eax
je 0x47c384
push eax
push 0x4ea408
push 0
push edi
call dword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
test eax, eax
jne 0x47c3b6
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x24]
call fcn.00406760
lea ecx, [esp + 0x14]
call fcn.00406760
lea ecx, [esp + 0x18]
call fcn.00406760
lea ecx, [esp + 0x1c]
call fcn.00406760
xor eax, eax
jmp 0x47c452
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, dword [esp + 0x44]
mov eax, dword [ebx]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x47c40f
mov eax, dword [ebx]
mov esi, dword [esp + 0x18]
push ecx
sub eax, 0x10
mov dword [esp + 0x34], esp
mov edi, esp
call fcn.004073f0
lea ecx, [esp + 0x48]
add eax, 0x10
push ecx
mov dword [edi], eax
call fcn.0049c799
add esp, 8
mov byte [esp + 0x3c], 7
or dword [esp + 0x20], 2
push eax
mov ecx, esi
call fcn.00406810
test eax, eax
jne 0x47c40f
xor bl, bl
jmp 0x47c411
mov bl, 1
test byte [esp + 0x20], 2
je 0x47c421
lea ecx, [esp + 0x44]
call fcn.00406760
lea ecx, [esp + 0x24]
call fcn.00406760
lea ecx, [esp + 0x14]
call fcn.00406760
lea ecx, [esp + 0x18]
call fcn.00406760
lea ecx, [esp + 0x1c]
call fcn.00406760
test bl, bl
jne 0x47c0f4
mov eax, 1
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 4