Function at 0x46a040
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50c614
mov eax, dword fs:[0]
push eax
sub esp, 0x444
mov eax, dword [0x5512c0]
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
mov esi, ecx
lea eax, [ebp - 0x44c]
push eax
mov ecx, str.5.36.0428.2211
mov dword [ebp - 0x440], esi
call fcn.004594a0
mov dword [ebp - 4], 0
mov edx, dword [0x550f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x550f18
call eax
add eax, 0x10
mov dword [ebp - 0x43c], eax
push 0x5191b4
lea ecx, [ebp - 0x43c]
push ecx
xor ebx, ebx
mov byte [ebp - 4], 1
call fcn.004593b0
mov edx, dword [ebp - 0x43c]
mov eax, dword [edx - 0xc]
test eax, eax
jne 0x46a110
call fcn.0046a6a0
lea esi, [ebp - 0x438]
call fcn.0048bb80
lea edi, [ebp - 0x43c]
mov byte [ebp - 4], 2
call fcn.0045c9e0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x438]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46a110
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x550f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x550f18
call eax
add eax, 0x10
mov dword [ebp - 0x448], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x43c]
mov edx, dword [ebp - 0x44c]
push ecx
push edx
push str.http:__tuijian.bd.baofeng.com_banding_servlet_BandingXml
push str._s_ver_sditchid_suid
lea edi, [ebp - 0x448]
call fcn.004596f0
mov edi, dword [ebp - 0x448]
add esp, 0x10
cmp dword [edi - 4], 1
jle 0x46a175
mov eax, dword [edi - 0xc]
push eax
lea ecx, [ebp - 0x448]
push ecx
call fcn.00459540
mov edi, dword [ebp - 0x448]
xor esi, esi
xor edx, edx
mov ebx, 7
mov eax, edi
mov word [ebp - 0x250], dx
mov dword [ebp - 0x23c], ebx
mov dword [ebp - 0x240], esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x46a196
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea ecx, [ebp - 0x250]
call fcn.00459a30
lea eax, [ebp - 0x430]
push eax
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 5
call fcn.00467630
mov byte [ebp - 4], bl
cmp dword [ebp - 0x23c], 8
jb 0x46a1e4
mov ecx, dword [ebp - 0x250]
push ecx
call fcn.004e4321
add esp, 4
mov eax, dword [edi - 8]
push eax
xor edx, edx
push edi
mov dword [ebp - 0x23c], ebx
mov dword [ebp - 0x240], esi
mov word [ebp - 0x250], dx
call fcn.004e68a0
add esp, 8
cmp eax, esi
jl 0x46a618
cmp eax, dword [edi - 8]
jg 0x46a618
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
mov eax, 0xbb8
mov dword [ebp - 0x27c], eax
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x274], eax
xor edx, edx
push 3
mov eax, 0x51d400
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x280], esi
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x224], esi
mov word [ebp - 0x234], dx
call fcn.00459a30
lea ecx, [ebp - 0x234]
lea ebx, [ebp - 0x430]
mov byte [ebp - 4], 8
call fcn.00467b10
mov byte [ebp - 4], 7
cmp dword [ebp - 0x220], 8
mov byte [ebp - 0x431], al
jb 0x46a29b
mov eax, dword [ebp - 0x234]
push eax
call fcn.004e4321
add esp, 4
mov esi, dword [ebp - 0x440]
lea ebx, [esi + 0x50]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x4c], 0
push ebx
je 0x46a352
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x430]
call fcn.00467870
lea eax, [edi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46a2e7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x43c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46a30d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x44c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46a336
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.004e3e00
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x4c], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [ebp - 0x431], 0
je 0x46a5a0
lea eax, [ebp - 0x234]
lea edx, [ebp - 0x430]
call fcn.00468aa0
mov byte [ebp - 4], 9
cmp dword [ebp - 0x220], 8
mov ecx, dword [ebp - 0x234]
jae 0x46a396
lea ecx, [ebp - 0x234]
lea edx, [ebp - 0x444]
push edx
call fcn.004594a0
mov eax, 4
lea ecx, [ebp - 0x450]
lea edx, [ebp - 0x444]
mov byte [ebp - 4], 0xa
call fcn.0045d440
mov byte [ebp - 4], 0xb
mov ebx, dword [ebp - 0x450]
push str.none
push ebx
call fcn.004e69c3
add esp, 8
test eax, eax
jne 0x46a3e4
mov dword [esi + 0x40], 1
jmp 0x46a51f
mov eax, dword [ebp - 0x444]
cmp dword [eax - 0xc], 0
jl 0x46a518
push str._root_
push eax
call fcn.004e7ada
add esp, 8
test eax, eax
je 0x46a518
mov ecx, dword [ebp - 0x444]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x46a518
cmp dword [ecx - 0xc], 0
jl 0x46a518
push str._node_
push ecx
call fcn.004e7ada
add esp, 8
test eax, eax
je 0x46a518
sub eax, dword [ebp - 0x444]
sar eax, 1
cmp eax, 0xffffffff
je 0x46a518
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x216]
push ecx
mov word [ebp - 0x218], ax
call fcn.004e8ae0
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x438]
push eax
lea ecx, [ebp - 0x218]
call fcn.004594a0
mov edx, str.BaoFengBdSetup.xml
lea eax, [ebp - 0x438]
mov byte [ebp - 4], 0xc
call fcn.0045b290
mov eax, dword [ebp - 0x438]
lea esi, [ebp - 0x26c]
call fcn.00459b40
mov eax, esi
lea esi, [ebp - 0x430]
mov byte [ebp - 4], 0xd
call fcn.00468ad0
test al, al
je 0x46a4ed
mov eax, dword [ebp - 0x440]
mov dword [eax + 0x40], 3
lea edi, [eax + 0x44]
lea eax, [ebp - 0x438]
call fcn.0045c9e0
mov edi, dword [ebp - 0x448]
jmp 0x46a4fa
mov ecx, dword [ebp - 0x440]
mov dword [ecx + 0x40], 2
lea esi, [ebp - 0x26c]
call fcn.0046d280
lea ecx, [ebp - 0x438]
call fcn.004590c0
mov esi, dword [ebp - 0x440]
jmp 0x46a51f
mov dword [esi + 0x40], 2
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 0xa
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46a53f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x444]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46a565
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 7
cmp dword [ebp - 0x220], 8
jb 0x46a581
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.004e4321
add esp, 4
xor edx, edx
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], dx
jmp 0x46a5a7
mov dword [esi + 0x40], 2
mov eax, dword [esi + 0x40]
cmp eax, 2
jne 0x46a5c9
call fcn.00469490
mov esi, dword [ebp - 0x440]
mov eax, dword [esi + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x46a2bc
cmp eax, 3
jne 0x46a609
mov eax, dword [esi + 0x44]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46a609
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov eax, dword [esi + 0x44]
push ecx
sub eax, 0x10
mov dword [ebp - 0x450], esp
mov ebx, esp
call fcn.0045cad0
add eax, 0x10
push esi
mov dword [ebx], eax
call fcn.004695e0
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [esi + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x46a2bc
push 0x80070057
call fcn.0045a310
int3