Function at 0x421d50
Capabilities:
Check if file exists
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x470932
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x48e110]
xor eax, esp
mov dword [esp + 0x270], eax
push ebx
push esi
push edi
mov eax, dword [0x48e110]
xor eax, esp
push eax
lea eax, [esp + 0x288]
mov dword fs:[0], eax
push 1
push 0x23
lea eax, [esp + 0x7c]
push eax
mov esi, ecx
push 0
mov dword [esp + 0x20], esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x78]
call fcn.00403080
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x18]
push eax
mov ebx, str.BaofengBFVKanDianYingHistoryhistory.ini
mov dword [esp + 0x298], 0
call fcn.00402c10
add esp, 8
mov byte [esp + 0x290], 1
mov ecx, dword [eax]
mov edi, dword [esp + 0x18]
lea eax, [ecx - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x421e36
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x421e28
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x421e28
call fcn.004033b0
mov esi, eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x421e1b
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
add esi, 0x10
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x10]
jmp 0x421e36
mov ebx, dword [ecx - 0xc]
push ecx
lea ecx, [esp + 0x1c]
push ecx
call fcn.004032a0
mov byte [esp + 0x290], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x421e5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x421fb0
lea edx, [esi + 0x44]
push edx
lea eax, [esp + 0x18]
push eax
mov ebx, 0x478048
call fcn.00402c10
add esp, 8
mov byte [esp + 0x290], 2
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov byte [esp + 0x290], 3
mov ecx, dword [esp + 0x14]
push ecx
push str._s__Module_ConvertHistory___From_Install_
lea edi, [esp + 0x18]
call fcn.00413e20
mov edi, dword [esp + 0x18]
add esp, 8
cmp dword [edi - 4], 1
jle 0x421ee0
mov edx, dword [edi - 0xc]
push edx
lea eax, [esp + 0x14]
push eax
call fcn.00403180
mov edi, dword [esp + 0x10]
push 0x40
xor ebx, ebx
lea ecx, [esp + 0x34]
push ebx
push ecx
call fcn.0045c960
add esp, 0xc
xor eax, eax
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x30]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edi
push ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x54], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x421f3e
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.0045ae41
add esp, 8
cmp eax, ebx
jl 0x42213c
cmp eax, dword [edi - 8]
jg 0x42213c
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
lea eax, [edi - 0x10]
mov byte [esp + 0x290], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x421f89
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x290], bl
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 0x421fb0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0x44
lea ecx, [esp + 0x14]
push esi
push ecx
mov ebx, 0x478048
call fcn.00402c10
add esp, 8
mov byte [esp + 0x290], 4
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov byte [esp + 0x290], 5
mov ecx, dword [esp + 0x14]
push ecx
push str._s__Module_ConvertHistoryForMiniVideo___From_Install_
lea edi, [esp + 0x18]
call fcn.00413e20
mov edi, dword [esp + 0x18]
add esp, 8
cmp dword [edi - 4], 1
jle 0x42201f
mov edx, dword [edi - 0xc]
push edx
lea eax, [esp + 0x14]
push eax
call fcn.00403180
mov edi, dword [esp + 0x10]
push 0x40
xor ebx, ebx
lea ecx, [esp + 0x34]
push ebx
push ecx
call fcn.0045c960
add esp, 0xc
xor eax, eax
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x30]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edi
push ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x54], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x42207b
mov ecx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
mov eax, dword [edi - 8]
push eax
push edi
call fcn.0045ae41
add esp, 8
cmp eax, ebx
jl 0x42213c
cmp eax, dword [edi - 8]
jg 0x42213c
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
lea eax, [edi - 0x10]
mov byte [esp + 0x290], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4220c6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x290], bl
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 0x4220ed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x290], 0xffffffff
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 0x422118
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x288]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x270]
xor ecx, esp
call fcn.0045a10c
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00401950
int3