Function at 0x40d2b0
Capabilities:
Accept command line arguments
Create http request
Get common file path
Get file attributes
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4439b1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9b0
mov eax, dword [0x452504]
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [esp + 0x9b0], eax
call esi
push 0x4476c0
push eax
call fcn.00435188
xor ebp, ebp
add esp, 8
cmp eax, ebp
je 0x40d346
mov al, byte [eax + 6]
cmp al, 0x31
jne 0x40d308
mov dword [str.http:__down.hangame.com_dist], 0x447694
jmp 0x40d346
cmp al, 0x32
jne 0x40d318
mov dword [str.http:__down.hangame.com_dist], 0x44766c
jmp 0x40d346
cmp al, 0x33
jne 0x40d328
mov dword [str.http:__down.hangame.com_dist], 0x447640
jmp 0x40d346
cmp al, 0x34
jne 0x40d338
mov dword [str.http:__down.hangame.com_dist], 0x447614
jmp 0x40d346
cmp al, 0x35
jne 0x40d346
mov dword [str.http:__down.hangame.com_dist], 0x4475e4
push 0x208
lea eax, [esp + 0x49c]
push eax
push ebp
mov byte [esp + 0x4a4], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40d36e
or eax, 0xffffffff
jmp 0x40d622
lea ecx, [esp + 0x498]
push 0x5c
push ecx
call fcn.004366e3
add esp, 8
cmp eax, ebp
je 0x40d865
inc eax
lea edx, [esp + 0x7a8]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40d392
lea edx, [esp + 0x7a8]
push edx
call fcn.0043523a
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x4a4]
push edx
mov dword [esp + 0x30], 0xbb8
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
call fcn.0042fbc0
add esp, 0x10
test eax, eax
jne 0x40d3f1
mov eax, 0xfffffffd
jmp 0x40d622
lea eax, [esp + 0x288]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x40d413
mov dword [esp + 0x288], 0x5c3a43
mov eax, dword [esp + 0xc]
movzx ecx, ax
push ebx
push ecx
shr eax, 0x10
push eax
mov eax, dword [esp + 0x14]
movzx edx, ax
push edx
shr eax, 0x10
push eax
push str.HGSTART_::_local__::__d._d._d._d_n
call fcn.004301d0
add esp, 0x14
call esi
push eax
lea eax, [esp + 0x48]
push str.ver
push eax
call fcn.00405980
add esp, 0xc
cmp dword [esp + 0x58], ebp
mov ebx, dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esp + 0x9c4], ebp
je 0x40d4a3
mov eax, dword [esp + 0xc]
mov ecx, eax
movzx edx, ax
mov eax, dword [esp + 0x10]
shr eax, 0x10
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x5c]
shr ecx, 0x10
cmp eax, 0x10
mov eax, dword [esp + 0x48]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
jae 0x40d491
lea eax, [esp + 0x48]
push eax
call fcn.004360b1
add esp, 4
mov dword [esp + 0x18], eax
jmp 0x40d5bd
mov ecx, dword [str.hgstarter_verinfo.dat]
push ecx
lea edx, [esp + 0x290]
push edx
lea eax, [esp + 0x18c]
push 0x4475b0
push eax
call fcn.004352bf
mov ecx, dword [str.hgstarter_verinfo.dat]
mov edx, dword [str.http:__down.hangame.com_dist]
push ecx
push edx
lea eax, [esp + 0x3ac]
push str._s_hgstart__s
push eax
call fcn.004352bf
lea ecx, [esp + 0x1a4]
push ecx
call fcn.0042fce0
add esp, 0x24
push ebp
push ebp
push 0x44654a
push ebp
push str.HGSTART_SELFUPDATE
call ebx
mov esi, eax
cmp esi, ebp
je 0x40d558
push 4
lea edx, [esp + 0x28]
push edx
push 6
push esi
call dword [sym.imp.WININET.dll_InternetSetOptionA]
push ebp
push ebp
lea eax, [esp + 0x39c]
push eax
lea ecx, [esp + 0x190]
push ecx
push esi
call fcn.004039f0
add esp, 0x14
test eax, eax
push esi
jne 0x40d552
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [esp + 0x44]
call fcn.00430c60
mov eax, 0xfffffffc
jmp 0x40d621
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea edx, [esp + 0x184]
push 0x447588
push edx
call fcn.00436b0c
mov esi, eax
add esp, 8
cmp esi, ebp
je 0x40d852
push 2
push ebp
push esi
call fcn.00436a67
push esi
call fcn.00436997
push ebp
push ebp
push esi
call fcn.00436a67
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x44]
push eax
push str._d._d._d._d
push esi
call fcn.004367eb
push esi
mov dword [esp + 0x9fc], ebp
call fcn.0043679a
add esp, 0x38
movzx edx, word [esp + 0x18]
movzx esi, word [esp + 0x1c]
movzx ecx, word [esp + 0x20]
push edi
movzx edi, word [esp + 0x18]
shl edi, 0x10
or edi, edx
shl esi, 0x10
or esi, ecx
movzx eax, di
push eax
mov ecx, edi
shr ecx, 0x10
push ecx
movzx edx, si
push edx
mov eax, esi
shr eax, 0x10
push eax
push str.HGSTART_::_server_::__d._d._d._d_n
call fcn.004301d0
mov eax, dword [esp + 0x24]
add esp, 0x14
cmp esi, eax
jae 0x40d645
push str.Local_HGStart_has_enough_version__so_self_updating_will_skip._n
call fcn.004301d0
add esp, 4
lea ecx, [esp + 0x48]
call fcn.00430c60
mov eax, 1
pop edi
pop ebx
mov ecx, dword [esp + 0x9b8]
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x9ac]
pop ebp
call fcn.00435083
add esp, 0x9bc
ret
jne 0x40d64d
cmp edi, dword [esp + 0x14]
jbe 0x40d605
lea ecx, [esp + 0x7b0]
push ecx
lea edx, [esp + 0x294]
push edx
lea eax, [esp + 0x88]
push 0x4475b0
push eax
call fcn.004352bf
mov edx, dword [str.http:__down.hangame.com_dist]
lea ecx, [esp + 0x7c0]
push ecx
push edx
lea eax, [esp + 0x6c0]
push str._s_hgstart__s
push eax
call fcn.004352bf
lea ecx, [esp + 0xa0]
push ecx
call fcn.0042fce0
add esp, 0x24
push ebp
push ebp
push 0x44654a
push ebp
push str.HGSTART_SELFUPDATE
call ebx
mov esi, eax
cmp esi, ebp
jne 0x40d6c8
lea ecx, [esp + 0x48]
call fcn.00430c60
mov eax, 0xfffffffa
jmp 0x40d620
push 4
lea edx, [esp + 0x2c]
push edx
push 6
push esi
call dword [sym.imp.WININET.dll_InternetSetOptionA]
push ebp
push ebp
lea eax, [esp + 0x6b0]
push eax
lea ecx, [esp + 0x8c]
push ecx
push esi
call fcn.004039f0
add esp, 0x14
test eax, eax
push esi
jne 0x40d711
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [esp + 0x48]
call fcn.00430c60
mov eax, 0xfffffff9
jmp 0x40d620
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea edx, [esp + 0x80]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or eax, 2
push eax
lea eax, [esp + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push str.hangame:__
push eax
call fcn.00435188
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x40d764
lea ecx, [esp + 0x48]
call fcn.00430c60
mov eax, 0xfffffff8
jmp 0x40d620
push str._clone
lea ecx, [esp + 0x68]
call fcn.00402e80
mov bl, 3
push esi
lea ecx, [esp + 0x30]
mov byte [esp + 0x9cc], bl
call fcn.00402e80
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0x9d4], 4
call fcn.0040d1c0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x9c8], bl
call fcn.00430c60
call fcn.0040d020
mov eax, dword [esp + 0x7c]
mov esi, 0x10
cmp eax, esi
mov eax, dword [esp + 0x68]
jae 0x40d7c4
lea eax, [esp + 0x68]
push ebp
push 5
push eax
lea ecx, [esp + 0x8c]
push ecx
push ebp
call fcn.0041a9a0
add esp, 0x14
test eax, eax
jne 0x40d818
push str._NEW_hgstart_download__new_hgstart_not_started__n
call fcn.004301d0
call fcn.0040d040
lea edx, [esp + 0x84]
push edx
call fcn.0042fce0
add esp, 8
lea ecx, [esp + 0x64]
call fcn.00430c60
lea ecx, [esp + 0x48]
call fcn.00430c60
mov eax, 0xfffffff7
jmp 0x40d620
cmp dword [esp + 0x7c], esi
mov eax, dword [esp + 0x68]
jae 0x40d826
lea eax, [esp + 0x68]
push eax
push str.clone_started_with_:__s_n
call fcn.004301d0
add esp, 8
call fcn.0040d040
lea ecx, [esp + 0x64]
call fcn.00430c60
lea ecx, [esp + 0x48]
call fcn.00430c60
xor eax, eax
jmp 0x40d620
lea ecx, [esp + 0x44]
call fcn.00430c60
mov eax, 0xfffffffb
jmp 0x40d621
mov eax, 0xfffffffe
jmp 0x40d622