Function at 0x401020
Capabilities:
Accept command line arguments
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x525d27
mov eax, dword fs:[0]
push eax
sub esp, 0x238
mov eax, dword [0x571a38]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
mov dword [ebp - 0x230], ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.0040a2c5
test eax, eax
jne 0x401087
push str.Fatal_Error:_MFC_initialization_failed_n
call fcn.004fcdb6
add esp, 4
mov dword [ebp - 0x230], 1
push 0x552a58
lea ecx, [ebp - 0x228]
call fcn.00408d50
mov dword [ebp - 4], ebx
mov edx, dword [ebp - 0x228]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x104
or eax, ecx
jge 0x4010ca
push 0x104
lea ecx, [ebp - 0x228]
call fcn.00408b70
mov edx, dword [ebp - 0x228]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x40119e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetWindowsDirectory_error:
push 0x579908
call fcn.00406400
add esp, 8
push eax
call fcn.00402e70
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00408330
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov ecx, dword [eax + esi + 0xc]
xor edi, edi
test cl, 6
jne 0x40112f
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40112f
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
cmp edi, ebx
je 0x40114e
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], ebx
jne 0x401147
or eax, 4
push ebx
push eax
call fcn.00408570
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x228]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401177
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
lea esp, [ebp - 0x254]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004fc787
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.004fcfc9
add esp, 8
cmp eax, ebx
jl 0x401b4f
mov ecx, dword [ebp - 0x228]
cmp eax, dword [ecx - 8]
jg 0x401b4f
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x228]
xor ecx, ecx
mov word [edx + eax*2], cx
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x23c], ebx
mov dword [ebp - 0x238], ebx
lea eax, [ebp - 0x240]
push eax
push ecx
mov ecx, esp
mov byte [ebp - 4], 1
mov dword [ebp - 0x21c], esp
push str.inf
lea edx, [ebp - 0x228]
push edx
push ecx
call fcn.00402d90
add esp, 0xc
call fcn.00401b60
mov esi, dword [ebp - 0x240]
mov edi, dword [ebp - 0x23c]
push 0x206
lea ecx, [ebp - 0x216]
xor eax, eax
push ebx
push ecx
mov dword [ebp - 0x22c], esi
mov dword [ebp - 0x21c], edi
mov word [ebp - 0x218], ax
call fcn.004ff570
add esp, 0x14
cmp esi, edi
je 0x4016d0
jmp 0x401260
mov edx, dword [ebp - 0x22c]
push edx
call fcn.00401ff0
add esp, 4
test eax, eax
je 0x4016b5
mov eax, dword [ebp - 0x22c]
mov eax, dword [eax]
push 0x104
push eax
lea ecx, [ebp - 0x218]
push 0x104
push ecx
call fcn.004fe250
lea eax, [ebp - 0x218]
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4012a2
sub eax, edx
sar eax, 1
mov edx, 0x46
mov dword [ebp + eax*2 - 0x21e], 0x4e0050
mov word [ebp + eax*2 - 0x21a], dx
mov eax, dword [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x224]
call fcn.004080e0
mov byte [ebp - 4], 2
mov ebx, dword [ebp - 0x224]
push 0x5c
push ebx
call fcn.004fd049
add esp, 8
test eax, eax
jne 0x4012f9
or eax, 0xffffffff
jmp 0x4012fd
sub eax, ebx
sar eax, 1
inc eax
push eax
lea ecx, [ebp - 0x244]
push ecx
lea ecx, [ebp - 0x224]
call fcn.00402c70
mov byte [ebp - 4], 3
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [ebx - 0x10]
cmp eax, esi
je 0x401372
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40135c
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40135c
push eax
call fcn.00408070
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x401351
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp - 0x224], ebx
jmp 0x401372
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x224]
call fcn.00408c60
mov ebx, dword [ebp - 0x224]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401398
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebx - 8]
mov eax, 1
sub eax, dword [ebx - 4]
or ecx, eax
jge 0x4013ba
push 0
lea ecx, [ebp - 0x224]
call fcn.00408b70
mov ebx, dword [ebp - 0x224]
test ebx, ebx
je 0x4013fb
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x4013fb
lea edi, [eax + eax]
mov eax, edi
call fcn.00502b20
mov esi, esp
test esi, esi
je 0x4013fb
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x4013fd
xor eax, eax
push eax
push str.Uninstall
push 0x579908
call fcn.00406400
add esp, 8
push eax
call fcn.00406400
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00408330
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x401449
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x401449
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40146a
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x401462
or eax, 4
push 0
push eax
call fcn.00408570
mov eax, 1
sub eax, dword [ebx - 4]
or eax, dword [ebx - 8]
jge 0x40148a
push 0
lea ecx, [ebp - 0x224]
call fcn.00408b70
mov ebx, dword [ebp - 0x224]
test ebx, ebx
je 0x4014cb
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x4014cb
lea edi, [eax + eax]
mov eax, edi
call fcn.00502b20
mov esi, esp
test esi, esi
je 0x4014cb
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x4014cd
xor eax, eax
push eax
push str.Uninstall
push 0x579608
call fcn.00406400
add esp, 8
push eax
call fcn.00406400
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00408330
mov edx, dword [esi]
mov eax, dword [edx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x401519
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x401519
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40153a
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x401532
or eax, 4
push 0
push eax
call fcn.00408570
push 0
push 1
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupUninstallOEMInfW]
mov edx, dword [ebp - 0x22c]
mov eax, dword [edx]
push eax
push str.Remove
push 0x579908
call fcn.00406400
add esp, 8
push eax
call fcn.00403050
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00408330
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x401596
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x401596
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x4015b7
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x4015af
or eax, 4
push 0
push eax
call fcn.00408570
mov edx, dword [ebp - 0x22c]
mov edi, dword [edx]
test edi, edi
je 0x40160c
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40160c
lea ebx, [eax + eax]
mov eax, ebx
call fcn.00502b20
mov esi, esp
test esi, esi
je 0x401606
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, dword [ebp - 0x224]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40160e
mov ebx, dword [ebp - 0x224]
xor eax, eax
push eax
push str.Remove
push 0x579608
call fcn.00406400
add esp, 8
push eax
call fcn.00406400
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00408330
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x40165a
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40165a
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40167b
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x401673
or eax, 4
push 0
push eax
call fcn.00408570
mov edx, dword [ebp - 0x22c]
mov eax, dword [edx]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4016b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x22c]
add eax, 4
mov dword [ebp - 0x22c], eax
cmp eax, dword [ebp - 0x21c]
jne 0x401260
call fcn.00402540
push str._system32drivers
lea ecx, [ebp - 0x228]
push ecx
lea edx, [ebp - 0x220]
push edx
call fcn.00402d90
push str._sprdvcom.sys
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
push ecx
mov byte [ebp - 4], 4
call fcn.00402d90
mov eax, dword [eax]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esp, 0x18
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401739
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprdvmdm.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40177b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._rdavcom.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4017bd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprdport.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4017ff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprdmux.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401841
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprdbus.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401883
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprdmodem.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4018c5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprd_acm.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401907
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprd_enum.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401949
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprd_rdavcom.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40198b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprd_wvcom.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4019cd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprd_wvmdm.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401a0f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._sprdvcomIOT.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401a51
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.usbcommsprdserial.sys
lea ecx, [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push edx
call fcn.00402d90
mov eax, dword [eax]
add esp, 0xc
push eax
call esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401a93
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401ab9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov esi, dword [ebp - 0x240]
xor ebx, ebx
cmp esi, ebx
je 0x401b09
mov eax, dword [ebp - 0x23c]
mov edi, eax
cmp esi, eax
je 0x401b00
mov eax, dword [esi]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401af3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x401ad5
mov esi, dword [ebp - 0x240]
push esi
call fcn.00408ea4
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x228]
add eax, 0xfffffff0
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x23c], ebx
mov dword [ebp - 0x238], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401b44
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x230]
jmp 0x40117c
push 0x80070057
call fcn.00408c10
int3