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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bc4e2
mov eax, dword fs:[0]
push eax
sub esp, 0x444
mov eax, dword [0x4f52c0]
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.47.0331.1111
mov dword [ebp - 0x450], esi
call fcn.00401d40
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edx, dword [0x4f4f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x4f4f18
call eax
add eax, 0x10
mov dword [ebp - 0x448], eax
mov byte [ebp - 4], 1
cmp dword [esi + 0xc0], ebx
jne 0x417a02
push 0x1b8
call fcn.0049948f
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 3
cmp eax, ebx
je 0x4179f6
push ebx
mov edi, eax
call fcn.00422250
jmp 0x4179f8
xor eax, eax
mov byte [ebp - 4], 1
mov dword [esi + 0xc0], eax
mov eax, dword [esi + 0xc0]
lea esi, [ebp - 0x444]
call fcn.0043da30
lea edi, [ebp - 0x448]
mov byte [ebp - 4], 4
call fcn.00404260
mov byte [ebp - 4], 1
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 0x417a48
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x4f4f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x4f4f18
call eax
add eax, 0x10
mov dword [ebp - 0x438], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x448]
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 - 0x438]
call fcn.00401f80
mov edi, dword [ebp - 0x438]
add esp, 0x10
cmp dword [edi - 4], 1
jle 0x417aad
mov eax, dword [edi - 0xc]
push eax
lea ecx, [ebp - 0x438]
push ecx
call fcn.00401de0
mov edi, dword [ebp - 0x438]
xor edx, edx
mov esi, 7
mov eax, edi
mov word [ebp - 0x250], dx
mov dword [ebp - 0x23c], esi
mov dword [ebp - 0x240], ebx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x417ad0
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea ecx, [ebp - 0x250]
call fcn.004022e0
lea eax, [ebp - 0x430]
push eax
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 6
call fcn.00414ec0
mov eax, 8
mov byte [ebp - 4], al
cmp dword [ebp - 0x23c], eax
jb 0x417b22
mov ecx, dword [ebp - 0x250]
push ecx
call fcn.00499080
add esp, 4
mov eax, dword [edi - 8]
push eax
xor edx, edx
push edi
mov dword [ebp - 0x23c], esi
mov dword [ebp - 0x240], ebx
mov word [ebp - 0x250], dx
call fcn.0049acee
add esp, 8
cmp eax, ebx
jl 0x417f46
cmp eax, dword [edi - 8]
jg 0x417f46
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, 0x4c9a64
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x280], ebx
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x224], ebx
mov word [ebp - 0x234], dx
call fcn.004022e0
lea ecx, [ebp - 0x234]
lea ebx, [ebp - 0x430]
mov byte [ebp - 4], 9
call fcn.004153a0
mov byte [ebp - 4], 8
cmp dword [ebp - 0x220], 8
mov byte [ebp - 0x431], al
jb 0x417bd9
mov eax, dword [ebp - 0x234]
push eax
call fcn.00499080
add esp, 4
mov ebx, dword [ebp - 0x450]
lea esi, [ebx + 0x50]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebx + 0x4c], 0
push esi
je 0x417c90
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x430]
call fcn.00415100
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 0x417c25
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 - 0x448]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x417c4b
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 0x417c74
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.0049908b
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0x4c], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [ebp - 0x431], 0
je 0x417ed2
lea eax, [ebp - 0x234]
lea edx, [ebp - 0x430]
call fcn.00416330
mov byte [ebp - 4], 0xa
cmp dword [ebp - 0x220], 8
mov ecx, dword [ebp - 0x234]
jae 0x417cd4
lea ecx, [ebp - 0x234]
lea edx, [ebp - 0x440]
push edx
call fcn.00401d40
mov eax, 4
lea ecx, [ebp - 0x444]
lea edx, [ebp - 0x440]
mov byte [ebp - 4], 0xb
call fcn.00404d10
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x444]
push str.none
push eax
call fcn.0049ae11
add esp, 8
test eax, eax
jne 0x417d22
mov dword [ebx + 0x40], 1
jmp 0x417e4b
mov eax, dword [ebp - 0x440]
cmp dword [eax - 0xc], 0
jl 0x417e44
push str._root_
push eax
call fcn.0049c5e1
add esp, 8
test eax, eax
je 0x417e44
mov ecx, dword [ebp - 0x440]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x417e44
cmp dword [ecx - 0xc], 0
jl 0x417e44
push str._node_
push ecx
call fcn.0049c5e1
add esp, 8
test eax, eax
je 0x417e44
sub eax, dword [ebp - 0x440]
sar eax, 1
cmp eax, 0xffffffff
je 0x417e44
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x216]
push edx
mov word [ebp - 0x218], cx
call fcn.0049dad0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [ebp - 0x43c]
push ecx
lea ecx, [ebp - 0x218]
call fcn.00401d40
mov edx, str.BaoFengBdSetup.xml
lea eax, [ebp - 0x43c]
mov byte [ebp - 4], 0xd
call fcn.00418680
mov eax, dword [ebp - 0x43c]
lea esi, [ebp - 0x26c]
call fcn.00402420
mov eax, esi
lea esi, [ebp - 0x430]
mov byte [ebp - 4], 0xe
call fcn.00416360
test al, al
je 0x417e25
lea edi, [ebx + 0x44]
lea eax, [ebp - 0x43c]
mov dword [ebx + 0x40], 3
call fcn.00404260
mov edi, dword [ebp - 0x438]
jmp 0x417e2c
mov dword [ebx + 0x40], 2
lea esi, [ebp - 0x26c]
call fcn.0041ac10
lea ecx, [ebp - 0x43c]
call fcn.00401980
jmp 0x417e4b
mov dword [ebx + 0x40], 2
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x444]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x417e71
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x440]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x417e97
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 8
cmp dword [ebp - 0x220], 8
jb 0x417eb3
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.00499080
add esp, 4
xor edx, edx
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], dx
jmp 0x417ed9
mov dword [ebx + 0x40], 2
mov eax, dword [ebx + 0x40]
cmp eax, 2
jne 0x417ef7
mov esi, ebx
call fcn.00416d50
mov eax, dword [ebx + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x417bfa
cmp eax, 3
jne 0x417f37
mov eax, dword [ebx + 0x44]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x417f37
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov eax, dword [ebx + 0x44]
push ecx
sub eax, 0x10
mov dword [ebp - 0x450], esp
mov esi, esp
call fcn.00404350
add eax, 0x10
push ebx
mov dword [esi], eax
call fcn.00416ea0
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebx + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x417bfa
push 0x80070057
call fcn.00402be0
int3