Function at 0x407630
Capabilities:
Check if file exists
Get common file path
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x420408
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x4282d0]
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 eax, eax
mov esi, ecx
push 0x206
push eax
lea ecx, [ebp - 0x216]
push ecx
mov dword [ebp - 0x22c], esi
mov word [ebp - 0x218], ax
call fcn.00410020
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x224], eax
mov eax, 0x424a8c
mov dword [ebp - 4], 0
test eax, 0xffff0000
jne 0x4076e3
mov ecx, eax
movzx edi, cx
push edi
call fcn.00402bb0
add esp, 4
test eax, eax
je 0x4076f6
push eax
mov eax, edi
lea edi, [ebp - 0x224]
call fcn.00402790
jmp 0x4076f6
push 0x424a8c
lea edx, [ebp - 0x224]
push edx
xor ebx, ebx
call fcn.004029b0
add esi, 8
lea edi, [ebp - 0x220]
mov eax, esi
mov dword [ebp - 4], 1
call fcn.00409f90
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov edi, dword [ebp - 0x224]
lea eax, [ecx - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x407774
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x407764
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x407764
call fcn.00403c40
mov dword [ebp - 0x21c], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x407753
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [ebp - 0x21c]
add ecx, 0x10
mov dword [ebp - 0x224], ecx
jmp 0x407774
mov ebx, dword [ecx - 0xc]
push ecx
lea edx, [ebp - 0x224]
push edx
call fcn.004029b0
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 0x40779a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x224]
push 0x423bb8
push ecx
call fcn.0040ed81
add esp, 8
test eax, eax
je 0x4077f9
lea edx, [ebp - 0x21c]
push 0x423bb8
push edx
mov ecx, esi
call fcn.0040a0e0
add esp, 8
mov edi, esi
mov byte [ebp - 4], 3
call fcn.00403a70
mov byte [ebp - 4], 1
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 0x4077f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x228], eax
lea ecx, [ebp - 0x218]
mov byte [ebp - 4], 4
test ecx, 0xffff0000
jne 0x407846
mov edx, ecx
movzx edi, dx
push edi
call fcn.00402bb0
add esp, 4
test eax, eax
je 0x407874
push eax
mov eax, edi
lea edi, [ebp - 0x228]
call fcn.00402790
jmp 0x407874
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407850
sub eax, edx
lea ecx, [ebp - 0x218]
sar eax, 1
push ecx
lea edx, [ebp - 0x228]
push edx
mov ebx, eax
call fcn.004029b0
push 8
push str.real.exe
lea ebx, [ebp - 0x228]
mov byte [ebp - 4], 5
call fcn.004028f0
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x220], eax
mov byte [ebp - 4], 6
mov eax, dword [esi]
push eax
push str._SETUP__Begin_Download_lUrl:_s
lea edi, [ebp - 0x220]
call fcn.00403920
mov ecx, dword [ebp - 0x220]
add esp, 8
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ebx, dword [ebp - 0x228]
mov ecx, dword [ebx - 8]
mov eax, 1
sub eax, dword [ebx - 4]
or ecx, eax
jge 0x4078f1
xor eax, eax
lea ecx, [ebp - 0x228]
call fcn.00402a90
mov ebx, dword [ebp - 0x228]
mov eax, dword [esi]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
or eax, ecx
jge 0x40790b
xor eax, eax
mov ecx, esi
call fcn.00402a90
mov eax, dword [esi]
mov edi, dword [ebp - 0x22c]
push eax
lea eax, [edi + 0x30]
call fcn.0040cc40
test eax, eax
je 0x4079f7
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x21c], eax
mov byte [ebp - 4], 7
mov ecx, dword [edi + 0x28]
mov edx, dword [edi + 0x24]
push ecx
push edx
push str.http:__action.logger.baofeng.com_ninstall_action.html
push str._s_type3uid_sver_sstartmi_overendrls5envbitmovie
lea edi, [ebp - 0x21c]
call fcn.00403920
add esp, 0x10
mov ecx, edi
call fcn.00409dd0
mov eax, dword [esi]
push eax
push str._SETUP___Download_lUrl:_s_successs_active
lea edi, [ebp - 0x220]
call fcn.00403920
mov esi, dword [ebp - 0x220]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4079cf
push 0
push ebx
call fcn.004096b0
test al, al
je 0x4079cf
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax + 0x28]
mov edx, dword [eax + 0x24]
push ecx
push edx
push str.http:__action.logger.baofeng.com_ninstall_action.html
push str._s_type3uid_sver_sstartmi_overendrls6envbitmovie
lea edi, [ebp - 0x21c]
call fcn.00403920
add esp, 0x10
mov ecx, edi
call fcn.00409dd0
mov byte [ebp - 4], 6
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 0x407a1a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x407a1a
mov ecx, dword [esi]
push ecx
push str._SETUP___Download_failed_lUrl:_s
lea edi, [ebp - 0x220]
call fcn.00403920
mov esi, dword [ebp - 0x220]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 5
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407a3a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0x407a5a
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 - 0x224]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407a83
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.0040d58c
mov esp, ebp
pop ebp
ret