Function at 0x406170
Capabilities:
Accept command line arguments
Create directory
Create thread
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52ccce
mov eax, dword fs:[0]
push eax
sub esp, 0x45c
mov eax, dword [0x588fc8]
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 edi, ecx
call fcn.00419e4c
push str.Update.exe
call fcn.00404530
push str.130805
push str.VersionName
push str.SoftwareVB_and_VBA_Program_Settings_bts_settings
call fcn.004019f0
push 0x53caa4
lea eax, [ebp - 0x454]
push str.SoftwareVB_and_VBA_Program_Settings_bts_settings
push eax
call fcn.00404470
mov ecx, dword [ebp - 0x454]
push 0x53cc1c
xor ebx, ebx
push ecx
mov dword [ebp - 4], ebx
call fcn.0050f561
add esp, 0x24
cmp eax, ebx
sete al
cmp al, bl
je 0x40621d
mov eax, dword [ebp - 0x454]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x406c6d
call fcn.00411e50
cmp eax, ebx
je 0x406231
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
jmp 0x406233
xor eax, eax
push 0x53d0ac
push 0x85
push ebx
mov ecx, eax
call fcn.00402120
push 0xc7
lea ecx, [ebp - 0x253]
push ebx
push ecx
mov byte [ebp - 0x254], bl
call fcn.0050f220
push 0xc8
lea edx, [ebp - 0x254]
push edx
push str._setting.ini
push str.isFirst
push str.HomePage
call fcn.00404280
push str._setting.ini
call fcn.00401920
add esp, 0x24
test al, al
jne 0x406426
push 0x12c
lea eax, [ebp - 0x448]
push eax
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea ecx, [ebp - 0x448]
push ecx
lea ecx, [ebp - 0x44c]
call fcn.00403e40
push 0xb
push str._btSearcher
lea ecx, [ebp - 0x44c]
mov byte [ebp - 4], 1
call fcn.00402fc0
mov edx, dword [ebp - 0x44c]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [ebp - 0x44c]
cmp dword [eax - 4], 1
jle 0x406300
mov eax, dword [eax - 0xc]
push eax
lea ecx, [ebp - 0x44c]
call fcn.00401f00
mov eax, dword [ebp - 0x44c]
push eax
push str.AppDataPath
push str.SoftwareVB_and_VBA_Program_Settings_bts_settings
call fcn.004019f0
push str._setting.ini
push 0x53cedc
push str.displaySetting
push str.HomePage
call fcn.00404130
push str._setting.ini
push str.http:__www.hao123.com__tn29065018_247_hao_pg
push str.homepage
push str.HomePage
call fcn.00404130
push str._setting.ini
push 0x53d054
push str.hpname
push str.HomePage
call fcn.00404130
push str._setting.ini
push str.FALSE
push str.isLocked
push str.HomePage
call fcn.00404130
add esp, 0x4c
push str._setting.ini
push 0x53cab0
push str.source
push str.HomePage
call fcn.00404130
push str._setting.ini
push 0x53cedc
push str.isFirst
push str.HomePage
call fcn.00404130
push str._setting.ini
push str.C:Documents_and_Settings_rr_
push str.Installer
push str.HomePage
call fcn.00404130
push str._setting.ini
push 0x53cec8
push str.autoRun
push str.HomePage
call fcn.00404130
add esp, 0x40
push str._setting.ini
push 0x53cec8
push str.askSetHomePage
push str.HomePage
call fcn.00404130
push 1
call fcn.004017f0
mov eax, dword [ebp - 0x44c]
add eax, 0xfffffff0
add esp, 0x14
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406426
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, 0x53cec8
lea eax, [ebp - 0x254]
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x406451
cmp cl, bl
je 0x40644d
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x406451
add eax, 2
add esi, 2
cmp cl, bl
jne 0x406431
xor eax, eax
jmp 0x406456
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x4065ca
push 0x12c
lea ecx, [ebp - 0x448]
push ecx
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea edx, [ebp - 0x448]
push edx
lea ecx, [ebp - 0x44c]
call fcn.00403e40
push 0xb
push str._btSearcher
lea ecx, [ebp - 0x44c]
mov byte [ebp - 4], 2
call fcn.00402fc0
mov eax, dword [ebp - 0x44c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [ebp - 0x44c]
cmp dword [eax - 4], 1
jle 0x4064cc
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x44c]
call fcn.00401f00
mov eax, dword [ebp - 0x44c]
push eax
push str.AppDataPath
push str.SoftwareVB_and_VBA_Program_Settings_bts_settings
call fcn.004019f0
push str._setting.ini
push str.http:__www.hao123.com__tn29065018_247_hao_pg
push str.homepage
push str.HomePage
call fcn.00404130
push str._setting.ini
push 0x53d054
push str.hpname
push str.HomePage
call fcn.00404130
push str._setting.ini
push str.FALSE
push str.isLocked
push str.HomePage
call fcn.00404130
push str._setting.ini
push 0x53cab0
push str.source
push str.HomePage
call fcn.00404130
add esp, 0x4c
push str._setting.ini
push 0x53cedc
push str.isFirst
push str.HomePage
call fcn.00404130
push 0xa
lea edx, [ebp - 0x1c]
push edx
push str._setting.ini
xor eax, eax
push str.autoRun
push str.HomePage
mov byte [ebp - 0x1c], bl
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov byte [ebp - 0x13], al
call fcn.00404280
push 3
lea eax, [ebp - 0x1c]
push 0x53cec8
push eax
call fcn.00510b3b
add esp, 0x30
test eax, eax
jne 0x4065a5
push 1
call fcn.004017f0
add esp, 4
mov eax, dword [ebp - 0x44c]
add eax, 0xfffffff0
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4065ca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0xc7
lea ecx, [ebp - 0x18b]
push ebx
push ecx
mov byte [ebp - 0x18c], bl
call fcn.0050f220
push 0xc8
lea edx, [ebp - 0x18c]
push edx
push str._setting.ini
push str.Installer
push str.HomePage
call fcn.00404280
add esp, 0x20
lea eax, [ebp - 0x18c]
push eax
lea ecx, [ebp - 0x458]
call fcn.00403e40
mov eax, dword [ebp - 0x458]
mov byte [ebp - 4], 3
cmp dword [eax - 0xc], ebx
jl 0x406643
push 0x53ce6c
push eax
call fcn.0050f44b
add esp, 8
cmp eax, ebx
je 0x406643
sub eax, dword [ebp - 0x458]
cmp eax, 0xffffffff
jne 0x40665f
push str._setting.ini
push str.C:Documents_and_Settings_rr_
push str.Installer
push str.HomePage
call fcn.00404130
add esp, 0x10
push 0xc8
lea ecx, [ebp - 0x18c]
push ebx
push ecx
call fcn.0050f220
push 0xc8
lea edx, [ebp - 0x18c]
push edx
push str._setting.ini
push str.askSetHomePage
push str.HomePage
call fcn.00404280
lea eax, [ebp - 0x18c]
add esp, 0x20
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4066a0
sub eax, edx
cmp eax, 1
jae 0x4066ca
push str._setting.ini
push 0x53cec8
push str.askSetHomePage
push str.HomePage
call fcn.00404130
add esp, 0x10
push ecx
mov eax, esp
mov dword [ebp - 0x460], esp
push eax
call fcn.004050f0
mov ecx, esp
mov dword [ebp - 0x464], esp
push str.130805
mov byte [ebp - 4], 4
call fcn.00403e40
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push str.www.happygolife.com_client_
mov byte [ebp - 4], 5
call fcn.00403e40
lea ecx, [ebp - 0x44c]
push ecx
mov byte [ebp - 4], 3
call fcn.00404bb0
add esp, 0x10
lea ecx, [edi + 0x110]
push eax
mov byte [ebp - 4], 6
call fcn.00403360
mov eax, dword [ebp - 0x44c]
add eax, 0xfffffff0
or esi, 0xffffffff
mov byte [ebp - 4], 3
lea edx, [eax + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40674e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
lea ecx, [ebp - 0x450]
call fcn.00403e40
mov ecx, dword [ebp - 0x450]
mov byte [ebp - 4], 7
cmp dword [ecx - 0xc], ebx
jl 0x40691f
push str.tray
push ecx
call fcn.0050f44b
mov ecx, dword [ebp - 0x450]
add esp, 8
cmp eax, ebx
je 0x4067e5
sub eax, ecx
cmp eax, esi
je 0x4067e5
push 0x142
mov byte [edi + 0x10e], 1
call fcn.00410607
add esp, 4
cmp eax, ebx
je 0x4067c6
push str.start
push 0x1bb
push str._client_report_
push str.happygolife.com
mov ecx, eax
call fcn.00401580
jmp 0x4067c8
xor eax, eax
lea ecx, [ebp - 0x45c]
push ecx
push ebx
push eax
push 0x405f70
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
jmp 0x4069b5
cmp dword [ecx - 0xc], ebx
jl 0x40691f
push str._install
push ecx
call fcn.0050f44b
mov ecx, dword [ebp - 0x450]
add esp, 8
cmp eax, ebx
je 0x4068ac
sub eax, ecx
cmp eax, esi
je 0x4068ac
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push str.install
mov byte [edi + 0x10e], 1
call fcn.00403e40
push 0x1bb
push str._client_report_
push str.happygolife.com
call fcn.00405dc0
add esp, 0x10
push ebx
call fcn.00410828
mov eax, dword [ebp - 0x450]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea edx, [eax + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40686d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x458]
add eax, 0xfffffff0
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406891
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x454]
add eax, 0xfffffff0
mov dword [ebp - 4], esi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], esi
dec esi
test esi, esi
jmp 0x406c6d
cmp dword [ecx - 0xc], ebx
jl 0x40691f
push str.uninstall
push ecx
call fcn.0050f44b
add esp, 8
cmp eax, ebx
je 0x40691f
sub eax, dword [ebp - 0x450]
cmp eax, esi
je 0x40691f
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push str.uninstall
mov byte [edi + 0x10e], 1
call fcn.00403e40
push 0x1bb
push str._client_report_
push str.happygolife.com
call fcn.00405dc0
add esp, 0x10
push ebx
call fcn.00410828
mov eax, dword [ebp - 0x450]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x406861
push 0x142
call fcn.00410607
add esp, 4
cmp eax, ebx
je 0x40694d
push str.start
push 0x1bb
push str._client_report_
push str.happygolife.com
mov ecx, eax
call fcn.00401580
jmp 0x40694f
xor eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
lea ecx, [ebp - 0x45c]
push ecx
push ebx
push eax
push 0x405f70
push ebx
push ebx
call esi
push 0x142
mov dword [ebp - 0x44c], eax
call fcn.00410607
add esp, 4
cmp eax, ebx
je 0x40699b
push str.activate
push 0x1bb
push str._client_report_
push str.happygolife.com
mov ecx, eax
call fcn.00401580
jmp 0x40699d
xor eax, eax
lea edx, [ebp - 0x468]
push edx
push ebx
push eax
push 0x405f70
push ebx
push ebx
call esi
cmp dword [ebp - 0x44c], ebx
jne 0x4069c3
push ebx
push ebx
push str.Log_Error
call fcn.004135fd
cmp byte [edi + 0x10e], bl
jne 0x4069f4
lea ecx, [ebp - 0xc4]
call fcn.00401720
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 8
call fcn.0041a15a
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 7
call fcn.00419927
push 0xc7
lea eax, [ebp - 0x31b]
push ebx
push eax
mov byte [ebp - 0x31c], bl
call fcn.0050f220
push 0xc8
lea ecx, [ebp - 0x31c]
push ecx
push str._setting.ini
push str.homepage
push str.HomePage
call fcn.00404280
push 0x14
lea edx, [ebp - 0x30]
push edx
xor eax, eax
push str._setting.ini
push str.displaySetting
push str.HomePage
mov byte [ebp - 0x30], bl
mov dword [ebp - 0x2f], eax
mov dword [ebp - 0x2b], eax
mov dword [ebp - 0x27], eax
mov dword [ebp - 0x23], eax
mov word [ebp - 0x1f], ax
mov byte [ebp - 0x1d], al
call fcn.00404280
lea eax, [ebp - 0x30]
add esp, 0x34
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x406a67
sub eax, edx
cmp eax, ebx
jbe 0x406b3f
push 0x14
lea eax, [ebp - 0x30]
push 0x53cec8
push eax
call fcn.00510b3b
add esp, 0xc
test eax, eax
jne 0x406ad2
push 0x63
lea ecx, [ebp - 0x93]
push ebx
push ecx
mov byte [ebp - 0x94], bl
call fcn.0050f220
push 0x64
lea edx, [ebp - 0x94]
push edx
push str._setting.ini
push str.homepage
push str.HomePage
call fcn.00404280
lea eax, [ebp - 0x94]
push eax
call fcn.00405b50
add esp, 0x24
jmp 0x406b4b
cmp byte [edi + 0x10e], bl
jne 0x406b4b
push 0xc8
lea ecx, [ebp - 0x18]
push ecx
push str._setting.ini
push str.askSetHomePage
push str.HomePage
mov byte [ebp - 0x18], bl
mov dword [ebp - 0x17], ebx
call fcn.00404280
push 5
lea edx, [ebp - 0x18]
push 0x53cec8
push edx
call fcn.00510b3b
add esp, 0x20
test eax, eax
jne 0x406b4b
lea ecx, [ebp - 0xc4]
call fcn.004016c0
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 9
call fcn.0041a15a
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 7
call fcn.00419927
jmp 0x406b4b
push ebx
push ebx
push str.Ini_File_Error
call fcn.004135fd
mov eax, dword [edi + 0x108]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push eax
mov eax, dword [edi + 0x20]
push 1
push 0x80
push eax
call esi
mov eax, dword [edi + 0x108]
mov ecx, dword [edi + 0x20]
push eax
push ebx
push 0x80
push ecx
call esi
push 2
push 0x258
push 0x320
push ebx
push ebx
push ebx
mov ecx, edi
call fcn.0041c6c9
push 4
push 0x258
push 0x324
push 0xfffffffffffffffe
push 0xfffffffffffffffe
push ebx
lea ecx, [edi + 0x94]
call fcn.0041c6c9
push ebx
push ebx
push ebx
mov byte [edi + 0x10c], bl
lea ecx, [edi + 0x94]
push ebx
cmp byte [edi + 0x10e], bl
jne 0x406bcb
mov eax, dword [edi + 0x110]
push eax
jmp 0x406bd0
push str.about:blank
call fcn.00410550
mov edx, dword [edi + 0x20]
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push ebx
push 0x1b7740
push 1
push edx
call esi
mov eax, dword [edi + 0x20]
push ebx
push 0x7d0
push 2
push eax
call esi
mov ecx, dword [edi + 0x20]
push ebx
push 0x3e8
push 3
push ecx
call esi
mov eax, dword [ebp - 0x450]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406c2b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x458]
add eax, 0xfffffff0
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c50
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x454]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c79
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
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.0050e65d
mov esp, ebp
pop ebp
ret