Function at 0x140001290
Capabilities:
Check internet connectivity via wininet
Create http request
Delete file
Download and write a file
Get http content length
Move file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
mov eax, 0x9418
call fcn.140032300
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x9328], 0xfffffffffffffffe
mov rdi, r8
mov r12, rdx
mov rsi, rcx
mov qword [rbp + 0x92e8], 0
mov dword [rbp + 0x92e4], 0
mov dword [rbp + 0x9220], 4
mov dword [rbp + 0x9224], 0x1000
xorps xmm0, xmm0
movaps xmmword [rbp + 0x9260], xmm0
mov qword [rbp + 0x9270], 0
mov qword [rbp + 0x9278], 0xf
movaps xmmword [rbp + 0x9280], xmm0
mov qword [rbp + 0x9290], 0
mov qword [rbp + 0x9298], 0xf
lea rcx, [rbp + 0x921c]
xor edx, edx
call qword [sym.imp.WININET.dll_InternetGetConnectedState]
mov eax, dword [rbp + 0x921c]
test al, 0x20
jne 0x140001371
test al, 4
jne 0x1400013da
mov dword [rsp + 0x20], 0
lea rcx, str.Overlunky_Updater
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.WININET.dll_InternetOpenA]
jmp 0x1400013f7
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x9110], 0
lea rax, [rbp + 0x8fc0]
mov qword [rbp + 0x9118], rax
lea rax, str._info__AutoUpdate:_Cant_connect_to_the_internet_n
mov qword [rbp + 0x92f0], rax
mov qword [rbp + 0x92f8], 0x31
lea rcx, [rbp + 0x92f0]
lea rdx, [rbp + 0x9110]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x140001781
mov dword [rsp + 0x20], 0
lea rcx, str.Overlunky_Updater
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.WININET.dll_InternetOpenA]
mov r15, rax
test rax, rax
je 0x1400016ae
lea rcx, str.Accept:___r_n_r_n
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x84000100
lea r8, str.Accept:___r_n_r_n
mov rcx, r15
mov rdx, rsi
mov r9d, eax
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov r14, rax
test rax, rax
je 0x140001714
mov dword [rsp + 0x20], 1
lea rdx, str.Overlunky.version
lea rcx, [rbp + 0x8fc0]
mov r8d, 1
mov r9d, 0x40
call fcn.14000a0e0
mov qword [rbp + 0x9100], rdi
mov rax, qword [rbp + 0x8fc0]
movsxd rax, dword [rax + 4]
lea rcx, [rax + rbp]
add rcx, 0x8fc0
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::fail_void_const___ptr64]
test al, al
je 0x140001838
lea rdx, str.Overlunky_WHIP_can_update_automatically__nDo_you_want_to_enable_automatic_updates_
lea r8, str.Overlunky_Update
xor ecx, ecx
mov r9d, 0x44
call qword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
jne 0x140001c2e
mov dword [rsp + 0x20], 1
lea rdx, str.Overlunky.version
lea rcx, [rbp + 0x9110]
mov r8d, 2
mov r9d, 0x40
call fcn.14000a690
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea rcx, [rax + rbp]
add rcx, 0x9110
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::fail_void_const___ptr64]
test al, al
jne 0x140001577
lea rdx, str.disabled
lea rcx, [rbp + 0x9110]
call fcn.14000a8c0
mov rsi, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rsi
mov dl, 0xa
call qword [sym.imp.MSVCP140.dll_public:_char___cdecl_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const___ptr64]
mov rcx, rsi
mov edx, eax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::put_char____ptr64]
mov rcx, rsi
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::flush_void____ptr64]
lea rcx, [rbp + 0x9118]
call fcn.14000c7d0
test rax, rax
jne 0x140001577
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea rcx, [rax + rbp]
add rcx, 0x9110
mov edx, dword [rbp + rax + 0x9120]
or edx, 2
xor r8d, r8d
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x92a0], 0
lea rax, [rbp + 0x92f0]
mov qword [rbp + 0x92a8], rax
lea rax, str._info__AutoUpdate:_Disabled__delete_Overlunky.version_or_run_with___update_to_enable_again._n
mov qword [rbp + 0x92c0], rax
mov qword [rbp + 0x92c8], 0x5c
lea rcx, [rbp + 0x92c0]
lea rdx, [rbp + 0x92a0]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea rcx, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rax + 0x9110], rcx
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0xa8]
mov dword [rbp + rax + 0x910c], ecx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x9118], rax
cmp qword [rbp + 0x9198], 0
je 0x140001666
mov rax, qword [rbp + 0x9130]
lea rcx, [rbp + 0x9188]
cmp qword [rax], rcx
jne 0x140001666
mov ecx, dword [rbp + 0x91a8]
mov rdx, qword [rbp + 0x91a0]
mov qword [rax], rdx
mov rax, qword [rbp + 0x9150]
mov qword [rax], rdx
sub ecx, edx
mov rax, qword [rbp + 0x9168]
mov dword [rax], ecx
lea rsi, [rbp + 0x9118]
cmp byte [rbp + 0x9194], 0
je 0x14000167e
mov rcx, rsi
call fcn.14000c7d0
lea rdi, [rbp + 0x91b8]
mov rcx, rsi
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, rdi
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::ios_base::destructor_void____ptr64]
mov al, 1
mov dword [rbp + 0x9324], eax
mov dword [rbp + 0x9318], 1
jmp 0x140002689
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x9110], 0
lea rax, [rbp + 0x8fc0]
mov qword [rbp + 0x9118], rax
lea rax, str._info__AutoUpdate:_Cant_connect_to_github_n
mov qword [rbp + 0x92f0], rax
mov qword [rbp + 0x92f8], 0x2b
lea rcx, [rbp + 0x92f0]
lea rdx, [rbp + 0x9110]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x140001781
mov rcx, r15
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x9110], 0
lea rax, [rbp + 0x8fc0]
mov qword [rbp + 0x9118], rax
lea rax, str._info__AutoUpdate:_Cant_get_release_information_from_github_n
mov qword [rbp + 0x92f0], rax
mov qword [rbp + 0x92f8], 0x3d
lea rcx, [rbp + 0x92f0]
lea rdx, [rbp + 0x9110]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov dword [rbp + 0x9324], 0
mov rax, qword [rbp + 0x9298]
cmp rax, 0x10
jb 0x1400017d9
mov rcx, qword [rbp + 0x9280]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x1400017d4
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140002947
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.140032198
mov rax, qword [rbp + 0x9278]
cmp rax, 0x10
jb 0x14000181e
mov rcx, qword [rbp + 0x9260]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140001819
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x14000294d
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.140032198
mov eax, dword [rbp + 0x9324]
add rsp, 0x9418
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, [rbp + 0x9110]
mov edx, 1
call fcn.14000a320
lea rcx, [rbp + 0x9120]
lea rdx, [rbp + 0x8fd0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64____ptr64]
lea rcx, [rbp + 0x9110]
lea rsi, [rbp + 0x92f0]
mov rdx, rsi
call fcn.14000a4d0
mov rax, qword [rbp + 0x9278]
cmp rax, 0x10
jb 0x1400018b8
mov rcx, qword [rbp + 0x9260]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x1400018b3
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140002958
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.140032198
mov r13, r14
movups xmm0, xmmword [rbp + 0x92f0]
movups xmm1, xmmword [rbp + 0x9300]
movaps xmmword [rbp + 0x9270], xmm1
movaps xmmword [rbp + 0x9260], xmm0
mov rax, qword [rbp + 0x9270]
cmp rax, 8
jb 0x140001af9
cmp qword [rbp + 0x9278], 0x10
jb 0x1400018fb
mov rdi, qword [rbp + 0x9260]
jmp 0x140001902
lea rdi, [rbp + 0x9260]
lea rbx, [rax + rdi]
add rbx, 0xfffffffffffffff9
mov r8, rbx
sub r8, rdi
mov rcx, rdi
mov edx, 0x64
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x140001af9
movabs r14, 0x64656c6261736964
cmp qword [rax], r14
je 0x140001955
inc rax
mov r8, rbx
sub r8, rax
mov rcx, rax
mov edx, 0x64
call sub.VCRUNTIME140.dll_memchr
test rax, rax
jne 0x140001930
jmp 0x140001af9
sub rax, rdi
cmp rax, 0xffffffffffffffff
je 0x140001af9
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x92a0], 0
mov qword [rbp + 0x92a8], rsi
lea rax, str._info__AutoUpdate:_Disabled__delete_Overlunky.version_or_run_with___update_to_enable_again._n
mov qword [rbp + 0x92c0], rax
mov qword [rbp + 0x92c8], 0x5c
lea rcx, [rbp + 0x92c0]
lea rdx, [rbp + 0x92a0]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea rcx, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rax + 0x9110], rcx
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0x98]
mov dword [rbp + rax + 0x910c], ecx
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + 0x9128], rax
test byte [rbp + 0x9198], 1
je 0x140001a79
mov rax, qword [rbp + 0x9168]
mov rax, qword [rax]
mov ecx, 0x70
test rax, rax
jne 0x140001a34
mov rax, qword [rbp + 0x9160]
mov rax, qword [rax]
mov ecx, 0x68
mov rcx, qword [rbp + rcx + 0x9110]
movsxd rdx, dword [rcx]
add rdx, rax
mov rax, qword [rbp + 0x9140]
mov rcx, qword [rax]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x140001a74
mov rax, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rax
cmp rcx, 0x20
jae 0x1400029aa
add rdx, 0x27
mov rcx, rax
call fcn.140032198
lea rsi, [rbp + 0x91a8]
lea rcx, [rbp + 0x9128]
mov rax, qword [rbp + 0x9140]
mov qword [rax], 0
mov rax, qword [rbp + 0x9160]
mov qword [rax], 0
mov rax, qword [rbp + 0x9178]
mov dword [rax], 0
mov rax, qword [rbp + 0x9148]
mov qword [rax], 0
mov rax, qword [rbp + 0x9168]
mov qword [rax], 0
mov rax, qword [rbp + 0x9180]
mov dword [rax], 0
mov qword [rbp + 0x9190], 0
and byte [rbp + 0x9198], 0xfe
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, rsi
jmp 0x140001691
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea rcx, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rax + 0x9110], rcx
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0x98]
mov dword [rbp + rax + 0x910c], ecx
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + 0x9128], rax
test byte [rbp + 0x9198], 1
mov r14, r13
je 0x140001bad
mov rax, qword [rbp + 0x9168]
mov rax, qword [rax]
mov ecx, 0x70
test rax, rax
jne 0x140001b68
mov rax, qword [rbp + 0x9160]
mov rax, qword [rax]
mov ecx, 0x68
mov rcx, qword [rbp + rcx + 0x9110]
movsxd rdx, dword [rcx]
add rdx, rax
mov rax, qword [rbp + 0x9140]
mov rcx, qword [rax]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x140001ba8
mov rax, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rax
cmp rcx, 0x20
jae 0x14000295e
add rdx, 0x27
mov rcx, rax
call fcn.140032198
lea rsi, [rbp + 0x91a8]
lea rcx, [rbp + 0x9128]
mov rax, qword [rbp + 0x9140]
mov qword [rax], 0
mov rax, qword [rbp + 0x9160]
mov qword [rax], 0
mov rax, qword [rbp + 0x9178]
mov dword [rax], 0
mov rax, qword [rbp + 0x9148]
mov qword [rax], 0
mov rax, qword [rbp + 0x9168]
mov qword [rax], 0
mov rax, qword [rbp + 0x9180]
mov dword [rax], 0
mov qword [rbp + 0x9190], 0
and byte [rbp + 0x9198], 0xfe
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, rsi
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::ios_base::destructor_void____ptr64]
mov qword [rsp + 0x20], 0
lea r8, [rbp + 0x7fb0]
lea r9, [rbp + 0x9224]
mov rcx, r14
mov edx, 0x16
call qword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x140001cc1
xorps xmm0, xmm0
movaps xmmword [rbp + 0x9300], xmm0
movaps xmmword [rbp + 0x92f0], xmm0
lea rcx, [rbp + 0x7fb0]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
test rax, rax
js 0x140002953
mov rsi, rax
cmp rax, 0xf
ja 0x140001d51
mov qword [rbp + 0x9300], rsi
mov qword [rbp + 0x9308], 0xf
lea rcx, [rbp + 0x92f0]
lea rdx, [rbp + 0x7fb0]
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
add rsi, rbp
add rsi, 0x92f0
jmp 0x140001dbe
mov dword [rbp + 0x9318], 1
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x92f0], 0
lea rax, [rbp + 0x9110]
mov qword [rbp + 0x92f8], rax
lea rax, str._info__AutoUpdate:_Cant_get_version_information_from_github_n
mov qword [rbp + 0x92a0], rax
mov qword [rbp + 0x92a8], 0x3d
lea rcx, [rbp + 0x92a0]
lea rdx, [rbp + 0x92f0]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov dword [rbp + 0x9324], 0
mov dword [rbp + 0x9318], 1
jmp 0x140002689
mov rax, rsi
or rax, 0xf
cmp rax, 0x17
mov ebx, 0x16
cmovae rbx, rax
cmp rbx, 0xfff
jb 0x140001d88
lea rcx, [rbx + 0x28]
call fcn.140032154
mov rdi, rax
add rdi, 0x27
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x140001d94
lea rcx, [rbx + 1]
call fcn.140032154
mov rdi, rax
mov qword [rbp + 0x92f0], rdi
mov qword [rbp + 0x9300], rsi
mov qword [rbp + 0x9308], rbx
lea rdx, [rbp + 0x7fb0]
mov rcx, rdi
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
add rsi, rdi
mov qword [rbp + 0x9318], r12
mov qword [rbp + 0x9228], r15
mov byte [rsi], 0
lea rcx, [rbp + 0x9110]
lea rdx, [rbp + 0x92f0]
mov r8d, 3
mov r9d, 1
call fcn.14000acb0
mov rax, qword [rbp + 0x9308]
cmp rax, 0x10
jb 0x140001e33
mov rcx, qword [rbp + 0x92f0]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140001e2e
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140002964
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.140032198
mov qword [rbp + 0x9108], r14
xorps xmm0, xmm0
movaps xmmword [rbp + 0x92a0], xmm0
mov qword [rbp + 0x92b0], 0
mov qword [rbp + 0x92b8], 0xf
lea rdi, [rbp + 0x92a0]
mov rbx, qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::fail_void_const___ptr64]
movabs r13, 0x646f4d2d7473614c
movabs rsi, 0x3a6465696669646f
jmp 0x140001ea0
mov qword [rbp + 0x9290], r15
mov rcx, r12
mov rdx, r14
mov r8, r15
call sub.VCRUNTIME140.dll_memmove
mov byte [r12 + r15], 0
nop dword [rax + rax]
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea rcx, [rax + rbp]
add rcx, 0x9110
mov dl, 0xa
call qword [sym.imp.MSVCP140.dll_public:_char___cdecl_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const___ptr64]
lea rcx, [rbp + 0x9110]
mov rdx, rdi
mov r8d, eax
call fcn.140011610
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call rbx
test al, al
jne 0x140001faf
cmp qword [rbp + 0x92b8], 0x10
mov r14, rdi
jb 0x140001ef8
mov r14, qword [rbp + 0x92a0]
mov r15, qword [rbp + 0x92b0]
cmp r15, 0xe
jb 0x140001ea0
lea r12, [r15 + r14]
add r12, 0xfffffffffffffff3
mov r8, r12
sub r8, r14
mov rcx, r14
mov edx, 0x4c
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x140001ea0
nop dword [rax]
mov rcx, qword [rax]
xor rcx, r13
mov rdx, qword [rax + 6]
xor rdx, rsi
or rdx, rcx
je 0x140001f62
inc rax
mov r8, r12
sub r8, rax
mov rcx, rax
mov edx, 0x4c
call sub.VCRUNTIME140.dll_memchr
test rax, rax
jne 0x140001f30
jmp 0x140001ea0
sub rax, r14
cmp rax, 0xffffffffffffffff
je 0x140001ea0
mov rax, qword [rbp + 0x9298]
cmp rax, r15
jae 0x140001f92
lea rcx, [rbp + 0x9280]
mov rdx, r15
mov r9, r14
call fcn.14000dab0
jmp 0x140001ea0
lea r12, [rbp + 0x9280]
cmp rax, 0x10
jb 0x140001e7e
mov r12, qword [rbp + 0x9280]
jmp 0x140001e7e
mov rsi, qword [rbp + 0x9318]
mov rcx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov qword [rbp + 0x92f0], rsi
mov qword [rbp + 0x92f8], rax
call fcn.1400329a0
lea rsi, [rbp + 0x92c0]
lea r8, [rbp + 0x92f0]
mov rcx, rsi
mov edx, eax
call fcn.140010f40
cmp qword [rbp + 0x92d8], 8
jb 0x140001ffa
mov rsi, qword [rbp + 0x92c0]
lea rdx, [rbp + 0x92f0]
mov rcx, rsi
mov r8d, 3
mov r9d, 0xffffffff
call fcn.140032678
xor esi, esi
cmp eax, 0x34
jg 0x140002031
lea ecx, [rax - 2]
cmp ecx, 2
jb 0x14000203f
test eax, eax
jne 0x14000297c
mov sil, 1
jmp 0x14000203f
cmp eax, 0x35
je 0x14000203f
cmp eax, 0x7b
jne 0x14000297c
mov rax, qword [rbp + 0x92d8]
cmp rax, 8
jb 0x14000208b
mov rcx, qword [rbp + 0x92c0]
lea rdx, [rax*2 + 2]
cmp rdx, 0x1000
jb 0x140002086
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x14000296a
add rax, rax
add rax, 0x29
mov rdx, rax
mov rcx, r8
call fcn.140032198
test sil, sil
je 0x1400020bb
mov r8, qword [rbp + 0x9290]
cmp qword [rbp + 0x9270], r8
jne 0x140002160
cmp qword [rbp + 0x9278], 0x10
jb 0x140002132
mov rcx, qword [rbp + 0x9260]
jmp 0x140002139
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rax, qword [rbp + 0x9318]
mov qword [rbp + 0x90f0], rax
mov qword [rbp + 0x9240], 0xc
lea rax, [rbp + 0x90f0]
mov qword [rbp + 0x9248], rax
lea rax, str._info__AutoUpdate:__is_missing__updating__n
mov qword [rbp + 0x9250], rax
mov qword [rbp + 0x9258], 0x2c
lea rcx, [rbp + 0x9250]
lea rdx, [rbp + 0x9240]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x140002241
lea rcx, [rbp + 0x9260]
cmp qword [rbp + 0x9298], 0x10
jb 0x14000214c
mov rdx, qword [rbp + 0x9280]
jmp 0x140002153
lea rdx, [rbp + 0x9280]
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x140002489
lea rdx, [0x140039d46]
lea rcx, [rbp + 0x9260]
call fcn.14000ae50
test al, al
je 0x1400021dd
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x9240], 0
lea rax, [rbp + 0x90f0]
mov qword [rbp + 0x9248], rax
lea rax, str._info__AutoUpdate:_No_old_version_information_found__updating_just_in_case__n
mov qword [rbp + 0x9250], rax
mov qword [rbp + 0x9258], 0x4c
lea rcx, [rbp + 0x9250]
lea rdx, [rbp + 0x9240]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x140002241
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x9240], 0
lea rax, [rbp + 0x90f0]
mov qword [rbp + 0x9248], rax
lea rax, str._info__AutoUpdate:_New_version_found__updating__n
mov qword [rbp + 0x9250], rax
mov qword [rbp + 0x9258], 0x30
lea rcx, [rbp + 0x9250]
lea rdx, [rbp + 0x9240]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
lea rdx, str.New_Overlunky_WHIP_version_available__nDo_you_want_to_update_
lea r8, str.Overlunky_Update
xor ecx, ecx
mov r9d, 0x44
call qword [sym.imp.USER32.dll_MessageBoxA]
mov cl, 1
mov dword [rbp + 0x9324], ecx
cmp eax, 7
je 0x140002508
lea rsi, str.Overlunky.dll.old
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
lea rcx, [0x1400377f6]
mov rdx, rsi
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rax, qword [rbp + 0x9318]
mov qword [rbp + 0x8fb0], rax
mov qword [rbp + 0x90d0], 0xc
lea rax, [rbp + 0x8fb0]
mov qword [rbp + 0x90d8], rax
lea rax, str._info__AutoUpdate:_Downloading_..._n
mov qword [rbp + 0x90e0], rax
mov qword [rbp + 0x90e8], 0x25
lea rcx, [rbp + 0x90e0]
lea rdx, [rbp + 0x90d0]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
lea r8, [0x140037c3f]
lea rcx, [rbp + 0x92e8]
mov rdx, qword [rbp + 0x9318]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
test eax, eax
je 0x1400023bf
mov rcx, qword [rbp + 0x9228]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [rbp + 0x9318], 1
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x92c0], 0
lea rax, [rbp + 0x92f0]
mov qword [rbp + 0x92c8], rax
lea rax, str._info__AutoUpdate:_Cant_write_new_file_n
mov qword [rbp + 0x9230], rax
mov qword [rbp + 0x9238], 0x28
lea rcx, [rbp + 0x9230]
lea rdx, [rbp + 0x92c0]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov dword [rbp + 0x9324], 0
jmp 0x1400024ff
mov qword [rsp + 0x20], 0
lea r8, [rbp + 0x92e4]
lea r9, [rbp + 0x9220]
mov rcx, qword [rbp + 0x9108]
mov edx, 0x20000005
call qword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x1400023f6
mov dword [rbp + 0x92e4], 0
lea rsi, [rbp - 0x50]
lea rdi, [rbp + 0x92e0]
mov rbx, qword [sym.imp.WININET.dll_InternetReadFile]
mov r14, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [rbp + 0x9108]
mov rdx, rsi
mov r8d, 0x8000
mov r9, rdi
call rbx
test eax, eax
je 0x1400028ba
mov r8d, dword [rbp + 0x92e0]
test r8, r8
je 0x140002453
mov r9, qword [rbp + 0x92e8]
mov edx, 1
mov rcx, rsi
call r14
cmp dword [rbp + 0x92e0], 0
jne 0x14000240f
mov rcx, qword [rbp + 0x92e8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rcx, qword [rbp + 0x92e8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov dword [rbp + 0x9318], 0
mov rcx, qword [rbp + 0x9228]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x140002512
mov dword [rbp + 0x9318], 1
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x92c0], 0
lea rax, [rbp + 0x92f0]
mov qword [rbp + 0x92c8], rax
lea rax, str._info__AutoUpdate:_Running_latest_version__n
mov qword [rbp + 0x9230], rax
mov qword [rbp + 0x9238], 0x2b
lea rcx, [rbp + 0x9230]
lea rdx, [rbp + 0x92c0]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov cl, 1
mov dword [rbp + 0x9324], ecx
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov dword [rbp + 0x9318], 1
mov rax, qword [rbp + 0x92b8]
cmp rax, 0x10
jb 0x140002557
mov rcx, qword [rbp + 0x92a0]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140002552
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140002970
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.140032198
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea rcx, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rax + 0x9110], rcx
mov rax, qword [rbp + 0x9110]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0x98]
mov dword [rbp + rax + 0x910c], ecx
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + 0x9128], rax
test byte [rbp + 0x9198], 1
je 0x140002608
mov rax, qword [rbp + 0x9168]
mov rax, qword [rax]
mov ecx, 0x70
test rax, rax
jne 0x1400025c3
mov rax, qword [rbp + 0x9160]
mov rax, qword [rax]
mov ecx, 0x68
mov rcx, qword [rbp + rcx + 0x9110]
movsxd rdx, dword [rcx]
add rdx, rax
mov rax, qword [rbp + 0x9140]
mov rcx, qword [rax]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x140002603
mov rax, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rax
cmp rcx, 0x20
jae 0x140002976
add rdx, 0x27
mov rcx, rax
call fcn.140032198
lea rsi, [rbp + 0x91a8]
lea rcx, [rbp + 0x9128]
mov rax, qword [rbp + 0x9140]
mov qword [rax], 0
mov rax, qword [rbp + 0x9160]
mov qword [rax], 0
mov rax, qword [rbp + 0x9178]
mov dword [rax], 0
mov rax, qword [rbp + 0x9148]
mov qword [rax], 0
mov rax, qword [rbp + 0x9168]
mov qword [rax], 0
mov rax, qword [rbp + 0x9180]
mov dword [rax], 0
mov qword [rbp + 0x9190], 0
and byte [rbp + 0x9198], 0xfe
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, rsi
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::ios_base::destructor_void____ptr64]
mov rax, qword [rbp + 0x8fc0]
movsxd rax, dword [rax + 4]
lea rcx, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rax + 0x8fc0], rcx
mov rax, qword [rbp + 0x8fc0]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0xb0]
mov dword [rbp + rax + 0x8fbc], ecx
lea rbx, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x8fd0], rbx
cmp qword [rbp + 0x9050], 0
je 0x14000270b
mov rax, qword [rbp + 0x8fe8]
lea rcx, [rbp + 0x9040]
cmp qword [rax], rcx
jne 0x14000270b
mov ecx, dword [rbp + 0x9060]
mov rdx, qword [rbp + 0x9058]
mov qword [rax], rdx
mov rax, qword [rbp + 0x9008]
mov qword [rax], rdx
sub ecx, edx
mov rax, qword [rbp + 0x9020]
mov dword [rax], ecx
lea rsi, [rbp + 0x8fd0]
cmp byte [rbp + 0x904c], 0
je 0x140002723
mov rcx, rsi
call fcn.14000c7d0
lea rdi, [rbp + 0x9070]
mov rcx, rsi
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, rdi
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::ios_base::destructor_void____ptr64]
cmp dword [rbp + 0x9318], 0
jne 0x140001794
mov dword [rsp + 0x20], 1
lea rdx, str.Overlunky.version
lea rcx, [rbp + 0x8fc0]
mov r8d, 2
mov r9d, 0x40
call fcn.14000a690
mov rsi, qword [rbp + 0x9100]
mov rax, qword [rbp + 0x8fc0]
movsxd rax, dword [rax + 4]
lea rcx, [rax + rbp]
add rcx, 0x8fc0
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::fail_void_const___ptr64]
test al, al
jne 0x1400027fe
mov r8, qword [rbp + 0x9290]
cmp qword [rbp + 0x9298], 0x10
jb 0x1400027b1
mov rdx, qword [rbp + 0x9280]
jmp 0x1400027b8
lea rdx, [rbp + 0x9280]
lea rcx, [rbp + 0x8fc0]
call fcn.140011890
lea rcx, [rbp + 0x8fc8]
call fcn.14000c7d0
test rax, rax
jne 0x1400027fe
mov rax, qword [rbp + 0x8fc0]
movsxd rax, dword [rax + 4]
lea rcx, [rax + rbp]
add rcx, 0x8fc0
mov edx, dword [rbp + rax + 0x8fd0]
or edx, 2
xor r8d, r8d
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
mov byte [rsi], 1
mov rax, qword [rbp + 0x8fc0]
movsxd rax, dword [rax + 4]
lea rcx, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rax + 0x8fc0], rcx
mov rax, qword [rbp + 0x8fc0]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0xa8]
mov dword [rbp + rax + 0x8fbc], ecx
mov qword [rbp + 0x8fc8], rbx
cmp qword [rbp + 0x9048], 0
je 0x14000287c
mov rax, qword [rbp + 0x8fe0]
lea rcx, [rbp + 0x9038]
cmp qword [rax], rcx
jne 0x14000287c
mov ecx, dword [rbp + 0x9058]
mov rdx, qword [rbp + 0x9050]
mov qword [rax], rdx
mov rax, qword [rbp + 0x9000]
mov qword [rax], rdx
sub ecx, edx
mov rax, qword [rbp + 0x9018]
mov dword [rax], ecx
lea rsi, [rbp + 0x8fc8]
cmp byte [rbp + 0x9044], 0
je 0x140002894
mov rcx, rsi
call fcn.14000c7d0
lea rdi, [rbp + 0x9068]
mov rcx, rsi
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, rdi
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::ios_base::destructor_void____ptr64]
mov al, 1
mov dword [rbp + 0x9324], eax
jmp 0x140001794
mov rcx, qword [rbp + 0x92e8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rbp + 0x9228]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [rbp + 0x9318], 1
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x92c0], 0
lea rax, [rbp + 0x92f0]
mov qword [rbp + 0x92c8], rax
lea rax, str._info__AutoUpdate:_Cant_read_file_from_github_n
mov qword [rbp + 0x9230], rax
mov qword [rbp + 0x9238], 0x2f
lea rcx, [rbp + 0x9230]
lea rdx, [rbp + 0x92c0]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x1400023b0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.14000bcd0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov dword [rbp + 0x92f0], eax
lea rax, [0x140035780]
mov qword [rbp + 0x92f8], rax
lea rcx, str.exists
lea rdx, [rbp + 0x92f0]
lea r8, [rbp + 0x92c0]
call fcn.14000dbe0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3