Function at 0x40b670
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff98
mov eax, 0x4c340c
call fcn.004aff88
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
cmp edx, dword [ecx + 0x70]
jne 0x40bb1a
mov word [ebp - 0x54], 8
lea eax, [ebp - 4]
call fcn.00408e34
inc dword [ebp - 0x48]
mov word [ebp - 0x54], 0x14
cmp dword [ebp + 0x10], 0
jle 0x40b834
mov byte [ebp - 0x65], 0
mov word [ebp - 0x54], 0x20
lea eax, [ebp - 8]
call fcn.00408e34
inc dword [ebp - 0x48]
mov word [ebp - 0x54], 0x2c
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov byte [edx + ecx], 0
mov word [ebp - 0x54], 0x38
push str.message
push dword [ebp + 0xc]
push dword [ebp + 8]
lea eax, [ebp - 0xc]
call fcn.00408e34
push eax
inc dword [ebp - 0x48]
call sym.Project1.exe__TcmAutoUpgrader_ReadString_qpct1
add esp, 0x10
lea edx, [ebp - 0xc]
mov eax, dword [ebp + 8]
add eax, 0x68
call fcn.004bb584
dec dword [ebp - 0x48]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004bb554
mov eax, dword [ebp + 8]
add eax, 0x68
call fcn.0040bb60
test al, al
jne 0x40b7e2
mov word [ebp - 0x54], 0x44
push str.version
push dword [ebp + 0xc]
push dword [ebp + 8]
lea eax, [ebp - 0x10]
call fcn.00408e34
push eax
inc dword [ebp - 0x48]
call sym.Project1.exe__TcmAutoUpgrader_ReadString_qpct1
add esp, 0x10
lea edx, [ebp - 0x10]
lea eax, [ebp - 8]
call fcn.004bb584
dec dword [ebp - 0x48]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004bb554
lea eax, [ebp - 8]
call fcn.0040bb60
test al, al
jne 0x40b7e2
lea eax, [ebp - 8]
call fcn.0040abb0
push eax
call fcn.00408920
pop ecx
mov edx, dword [ebp + 8]
fstp dword [edx + 0x74]
mov word [ebp - 0x54], 0x50
push str.url1
push dword [ebp + 0xc]
push dword [ebp + 8]
lea eax, [ebp - 0x14]
call fcn.00408e34
push eax
inc dword [ebp - 0x48]
call sym.Project1.exe__TcmAutoUpgrader_ReadString_qpct1
add esp, 0x10
lea edx, [ebp - 0x14]
mov eax, dword [ebp + 8]
add eax, 0x6c
call fcn.004bb584
dec dword [ebp - 0x48]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004bb554
mov eax, dword [ebp + 8]
add eax, 0x68
call fcn.0040bb60
test al, al
jne 0x40b7e2
mov byte [ebp - 0x65], 1
cmp byte [ebp - 0x65], 0
jne 0x40b819
mov word [ebp - 0x54], 0x5c
mov edx, 0x4c312b
lea eax, [ebp - 0x18]
call fcn.004bb388
inc dword [ebp - 0x48]
lea edx, [ebp - 0x18]
lea eax, [ebp - 4]
call fcn.004bb584
dec dword [ebp - 0x48]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004bb554
dec dword [ebp - 0x48]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004bb554
mov word [ebp - 0x54], 0x14
jmp 0x40b8d7
cmp dword [ebp + 0x10], 0xfffffffe
jne 0x40b86d
mov word [ebp - 0x54], 0x68
mov edx, str.Fail_to_connect_server_
lea eax, [ebp - 0x1c]
call fcn.004bb388
inc dword [ebp - 0x48]
lea edx, [ebp - 0x1c]
lea eax, [ebp - 4]
call fcn.004bb584
dec dword [ebp - 0x48]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004bb554
jmp 0x40b8d7
cmp dword [ebp + 0x10], 0xfffffffd
jne 0x40b8a6
mov word [ebp - 0x54], 0x74
mov edx, str.Fail_to_locate_upgrade_page_
lea eax, [ebp - 0x20]
call fcn.004bb388
inc dword [ebp - 0x48]
lea edx, [ebp - 0x20]
lea eax, [ebp - 4]
call fcn.004bb584
dec dword [ebp - 0x48]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.004bb554
jmp 0x40b8d7
mov word [ebp - 0x54], 0x80
mov edx, str.Fail_to_read_upgrade_information_
lea eax, [ebp - 0x24]
call fcn.004bb388
inc dword [ebp - 0x48]
lea edx, [ebp - 0x24]
lea eax, [ebp - 4]
call fcn.004bb584
dec dword [ebp - 0x48]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.004bb554
lea eax, [ebp - 4]
call fcn.0040bb60
test al, al
je 0x40bad4
mov edx, dword [ebp + 8]
fld dword [edx + 0x74]
mov ecx, dword [ebp + 8]
fsub dword [ecx + 0x78]
fcomp qword [0x40bb58]
fnstsw ax
sahf
jbe 0x40baa6
mov word [ebp - 0x54], 0x8c
push 2
mov edx, dword [ebp + 8]
push dword [edx + 0x74]
lea eax, [ebp - 0x28]
call fcn.00408e34
push eax
inc dword [ebp - 0x48]
call fcn.004089dc
add esp, 0xc
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x2c]
call fcn.00408e34
mov ecx, eax
inc dword [ebp - 0x48]
mov eax, str.Find_a_later_version_
pop edx
call fcn.004bb988
lea ecx, [ebp - 0x2c]
push ecx
lea eax, [ebp - 0x34]
call fcn.00408e34
push eax
inc dword [ebp - 0x48]
mov edx, 0x4c31c9
lea eax, [ebp - 0x30]
call fcn.004bb388
inc dword [ebp - 0x48]
lea edx, [ebp - 0x30]
pop ecx
pop eax
call fcn.004bb5ac
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x38]
call fcn.00408e34
mov ecx, eax
inc dword [ebp - 0x48]
mov edx, dword [ebp + 8]
add edx, 0x68
pop eax
call fcn.004bb5ac
lea edx, [ebp - 0x38]
lea eax, [ebp - 4]
call fcn.004bb584
dec dword [ebp - 0x48]
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.004bb554
dec dword [ebp - 0x48]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.004bb554
dec dword [ebp - 0x48]
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.004bb554
dec dword [ebp - 0x48]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.004bb554
dec dword [ebp - 0x48]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004bb554
mov word [ebp - 0x54], 0x98
mov edx, 0x4c31fe
lea eax, [ebp - 0x3c]
call fcn.004bb388
inc dword [ebp - 0x48]
lea edx, [ebp - 0x3c]
lea eax, [ebp - 4]
call fcn.004bb8c0
test eax, eax
sete cl
and ecx, 1
push ecx
dec dword [ebp - 0x48]
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.004bb554
pop ecx
test cl, cl
je 0x40ba52
mov word [ebp - 0x54], 0xa4
mov edx, str._n___________________________________________________n
lea eax, [ebp - 0x40]
call fcn.004bb388
inc dword [ebp - 0x48]
lea edx, [ebp - 0x40]
lea eax, [ebp - 4]
call fcn.004bb598
dec dword [ebp - 0x48]
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.004bb554
push 0x21
mov eax, dword [ebp + 8]
add eax, 0x60
call fcn.0040abb0
push eax
lea eax, [ebp - 4]
call fcn.0040abb0
push eax
mov edx, dword [0x4cadb8]
mov ecx, dword [edx]
push dword [ecx + 0x30]
call sub.USER32.DLL_MessageBoxA
dec eax
jne 0x40bb04
push 1
push 0
push 0
mov eax, dword [ebp + 8]
add eax, 0x6c
call fcn.0040abb0
push eax
push 0
mov edx, dword [0x4cadb8]
mov ecx, dword [edx]
push dword [ecx + 0x30]
call sub.SHELL32.DLL_ShellExecuteA
jmp 0x40bb04
mov eax, dword [ebp + 8]
cmp byte [eax + 0x7c], 0
je 0x40bb04
push 0x20
mov eax, dword [ebp + 8]
add eax, 0x60
call fcn.0040abb0
push eax
push 0x4c325d
mov edx, dword [0x4cadb8]
mov ecx, dword [edx]
push dword [ecx + 0x30]
call sub.USER32.DLL_MessageBoxA
jmp 0x40bb04
mov eax, dword [ebp + 8]
cmp byte [eax + 0x7c], 0
je 0x40bb04
push 0x30
mov eax, dword [ebp + 8]
add eax, 0x60
call fcn.0040abb0
push eax
lea eax, [ebp - 4]
call fcn.0040abb0
push eax
mov edx, dword [0x4cadb8]
mov ecx, dword [edx]
push dword [ecx + 0x30]
call sub.USER32.DLL_MessageBoxA
dec dword [ebp - 0x48]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004bb554
mov word [ebp - 0x54], 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call sym.Project1.exe__TcmDownloader_FinishDownload_qpci
add esp, 0xc
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
cmp ecx, dword [eax + 0x70]
jne 0x40bb4a
mov edx, dword [ebp + 8]
push dword [edx + 0x70]
call fcn.004af0b0
pop ecx
mov ecx, dword [ebp + 8]
xor eax, eax
mov dword [ecx + 0x70], eax
mov edx, dword [ebp - 0x64]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret