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, 0x93e8
call fcn.140031c20
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x92f8], 0xfffffffffffffffe
mov rdi, r8
mov r12, rdx
mov rsi, rcx
mov qword [rbp + 0x92b8], 0
mov dword [rbp + 0x92b4], 0
mov dword [rbp + 0x9220], 4
mov dword [rbp + 0x9224], 0x1000
xorps xmm0, xmm0
movaps xmmword [rbp + 0x9250], xmm0
mov qword [rbp + 0x9260], 0
mov qword [rbp + 0x9268], 0xf
movaps xmmword [rbp + 0x9270], xmm0
mov qword [rbp + 0x9280], 0
mov qword [rbp + 0x9288], 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 0x1400013e4
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 0x140001401
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 + 0x8fc0], 0
mov qword [rbp + 0x9100], 0
lea rax, [rbp + 0x8fc0]
mov qword [rbp + 0x9108], rax
lea rax, str._info__AutoUpdate:_Cant_connect_to_the_internet_n
mov qword [rbp + 0x92c0], rax
mov qword [rbp + 0x92c8], 0x31
lea rcx, [rbp + 0x92c0]
lea rdx, [rbp + 0x9100]
call fcn.1400194f0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x1400017a9
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 0x1400016c2
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 0x140001732
mov dword [rsp + 0x20], 1
lea rdx, str.Overlunky.version
lea rcx, [rbp + 0x8fc0]
mov r8d, 1
mov r9d, 0x40
call fcn.140009f30
mov qword [rbp + 0x9208], 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 0x140001860
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 0x140001ad4
mov dword [rsp + 0x20], 1
lea rdx, str.Overlunky.version
lea rcx, [rbp + 0x9100]
mov r8d, 2
mov r9d, 0x40
call fcn.14000a4e0
mov rax, qword [rbp + 0x9100]
movsxd rax, dword [rax + 4]
lea rcx, [rax + rbp]
add rcx, 0x9100
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::fail_void_const___ptr64]
test al, al
jne 0x140001581
lea rdx, str.disabled
lea rcx, [rbp + 0x9100]
call fcn.14000a710
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 + 0x9108]
call fcn.14000c440
test rax, rax
jne 0x140001581
mov rax, qword [rbp + 0x9100]
movsxd rax, dword [rax + 4]
lea rcx, [rax + rbp]
add rcx, 0x9100
mov edx, dword [rbp + rax + 0x9110]
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 dword [rbp + 0x92c0], 0
mov qword [rbp + 0x9290], 0
lea rax, [rbp + 0x92c0]
mov qword [rbp + 0x9298], rax
lea rax, str._info__AutoUpdate:_Disabled__delete_Overlunky.version_or_run_with___update_to_enable_again._n
mov qword [rbp + 0x9228], rax
mov qword [rbp + 0x9230], 0x5c
lea rcx, [rbp + 0x9228]
lea rdx, [rbp + 0x9290]
call fcn.1400194f0
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 + 0x9100]
movsxd rax, dword [rax + 4]
lea rcx, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rax + 0x9100], rcx
mov rax, qword [rbp + 0x9100]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0xa8]
mov dword [rbp + rax + 0x90fc], ecx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x9108], rax
cmp qword [rbp + 0x9188], 0
je 0x14000167a
mov rax, qword [rbp + 0x9120]
lea rcx, [rbp + 0x9178]
cmp qword [rax], rcx
jne 0x14000167a
mov ecx, dword [rbp + 0x9198]
mov rdx, qword [rbp + 0x9190]
mov qword [rax], rdx
mov rax, qword [rbp + 0x9140]
mov qword [rax], rdx
sub ecx, edx
mov rax, qword [rbp + 0x9158]
mov dword [rax], ecx
lea rsi, [rbp + 0x9108]
cmp byte [rbp + 0x9184], 0
je 0x140001692
mov rcx, rsi
call fcn.14000c440
lea rdi, [rbp + 0x91a8]
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 + 0x92f4], eax
mov dword [rbp + 0x92e8], 1
jmp 0x140002394
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 + 0x8fc0], 0
mov qword [rbp + 0x9100], 0
lea rax, [rbp + 0x8fc0]
mov qword [rbp + 0x9108], rax
lea rax, str._info__AutoUpdate:_Cant_connect_to_github_n
mov qword [rbp + 0x92c0], rax
mov qword [rbp + 0x92c8], 0x2b
lea rcx, [rbp + 0x92c0]
lea rdx, [rbp + 0x9100]
call fcn.1400194f0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x1400017a9
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 dword [rbp + 0x8fc0], 0
mov qword [rbp + 0x9100], 0
lea rax, [rbp + 0x8fc0]
mov qword [rbp + 0x9108], rax
lea rax, str._info__AutoUpdate:_Cant_get_release_information_from_github_n
mov qword [rbp + 0x92c0], rax
mov qword [rbp + 0x92c8], 0x3d
lea rcx, [rbp + 0x92c0]
lea rdx, [rbp + 0x9100]
call fcn.1400194f0
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 + 0x92f4], 0
mov rax, qword [rbp + 0x9288]
cmp rax, 0x10
jb 0x140001801
mov rcx, qword [rbp + 0x9270]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x1400017fc
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140002619
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.140031ab8
mov rax, qword [rbp + 0x9268]
cmp rax, 0x10
jb 0x140001846
mov rcx, qword [rbp + 0x9250]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140001841
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x14000261f
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.140031ab8
mov eax, dword [rbp + 0x92f4]
add rsp, 0x93e8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, [rbp + 0x9100]
mov edx, 1
call fcn.14000a170
lea rcx, [rbp + 0x9110]
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 + 0x9100]
lea rsi, [rbp + 0x92c0]
mov rdx, rsi
call fcn.14000a320
mov r13, r14
mov rax, qword [rbp + 0x9268]
cmp rax, 0x10
jb 0x1400018e3
mov rcx, qword [rbp + 0x9250]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x1400018de
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x14000262a
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.140031ab8
movups xmm0, xmmword [rbp + 0x92c0]
movups xmm1, xmmword [rbp + 0x92d0]
movaps xmmword [rbp + 0x9260], xmm1
movaps xmmword [rbp + 0x9250], xmm0
mov rax, qword [rbp + 0x9260]
cmp rax, 8
jb 0x140001a69
cmp qword [rbp + 0x9268], 0x10
jb 0x140001923
mov rdi, qword [rbp + 0x9250]
jmp 0x14000192a
lea rdi, [rbp + 0x9250]
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 0x140001a69
movabs r14, 0x64656c6261736964
nop dword [rax + rax]
cmp qword [rax], r14
je 0x140001985
inc rax
mov r8, rbx
sub r8, rax
mov rcx, rax
mov edx, 0x64
call sub.VCRUNTIME140.dll_memchr
test rax, rax
jne 0x140001960
jmp 0x140001a69
sub rax, rdi
cmp rax, 0xffffffffffffffff
je 0x140001a69
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 + 0x92c0], 0
mov qword [rbp + 0x9290], 0
mov qword [rbp + 0x9298], rsi
lea rax, str._info__AutoUpdate:_Disabled__delete_Overlunky.version_or_run_with___update_to_enable_again._n
mov qword [rbp + 0x9228], rax
mov qword [rbp + 0x9230], 0x5c
lea rcx, [rbp + 0x9228]
lea rdx, [rbp + 0x9290]
call fcn.1400194f0
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 rsi, [rbp + 0x9198]
mov rax, qword [rbp + 0x9100]
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 + 0x9100], rcx
mov rax, qword [rbp + 0x9100]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0x98]
mov dword [rbp + rax + 0x90fc], ecx
lea rdi, [rbp + 0x9118]
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + 0x9118], rax
mov rcx, rdi
call fcn.14000bc30
mov rcx, rdi
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 0x1400016a5
lea rsi, [rbp + 0x9198]
mov rax, qword [rbp + 0x9100]
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 + 0x9100], rcx
mov rax, qword [rbp + 0x9100]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0x98]
mov dword [rbp + rax + 0x90fc], ecx
lea rdi, [rbp + 0x9118]
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + 0x9118], rax
mov rcx, rdi
call fcn.14000bc30
mov rcx, rdi
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 r14, r13
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 0x140001b67
xorps xmm0, xmm0
movaps xmmword [rbp + 0x92d0], xmm0
movaps xmmword [rbp + 0x92c0], xmm0
lea rcx, [rbp + 0x7fb0]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
test rax, rax
js 0x140002625
mov rsi, rax
cmp rax, 0xf
ja 0x140001c01
mov qword [rbp + 0x92d0], rsi
mov qword [rbp + 0x92d8], 0xf
lea rcx, [rbp + 0x92c0]
lea rdx, [rbp + 0x7fb0]
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
add rsi, rbp
add rsi, 0x92c0
jmp 0x140001c6e
mov dword [rbp + 0x92e8], 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 dword [rbp + 0x9100], 0
mov qword [rbp + 0x92c0], 0
lea rax, [rbp + 0x9100]
mov qword [rbp + 0x92c8], rax
lea rax, str._info__AutoUpdate:_Cant_get_version_information_from_github_n
mov qword [rbp + 0x9290], rax
mov qword [rbp + 0x9298], 0x3d
lea rcx, [rbp + 0x9290]
lea rdx, [rbp + 0x92c0]
call fcn.1400194f0
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 + 0x92f4], 0
mov dword [rbp + 0x92e8], 1
jmp 0x140002394
mov rax, rsi
or rax, 0xf
cmp rax, 0x17
mov ebx, 0x16
cmovae rbx, rax
cmp rbx, 0xfff
jb 0x140001c38
lea rcx, [rbx + 0x28]
call fcn.140031a74
mov rdi, rax
add rdi, 0x27
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x140001c44
lea rcx, [rbx + 1]
call fcn.140031a74
mov rdi, rax
mov qword [rbp + 0x92c0], rdi
mov qword [rbp + 0x92d0], rsi
mov qword [rbp + 0x92d8], rbx
lea rdx, [rbp + 0x7fb0]
mov rcx, rdi
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
add rsi, rdi
mov qword [rbp + 0x92e8], r12
mov qword [rbp + 0x9248], r15
mov byte [rsi], 0
lea rcx, [rbp + 0x9100]
lea rdx, [rbp + 0x92c0]
mov r8d, 3
mov r9d, 1
call fcn.14000ab00
mov rax, qword [rbp + 0x92d8]
cmp rax, 0x10
jb 0x140001ce3
mov rcx, qword [rbp + 0x92c0]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140001cde
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140002630
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.140031ab8
mov qword [rbp + 0x9210], r14
xorps xmm0, xmm0
movaps xmmword [rbp + 0x9290], xmm0
mov qword [rbp + 0x92a0], 0
mov qword [rbp + 0x92a8], 0xf
lea rdi, [rbp + 0x9290]
mov rbx, qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::fail_void_const___ptr64]
movabs r13, 0x646f4d2d7473614c
movabs rsi, 0x3a6465696669646f
jmp 0x140001d50
mov qword [rbp + 0x9280], r14
mov rcx, r12
mov rdx, r15
mov r8, r14
call sub.VCRUNTIME140.dll_memmove
mov byte [r12 + r14], 0
nop dword [rax + rax]
mov rax, qword [rbp + 0x9100]
movsxd rax, dword [rax + 4]
lea rcx, [rax + rbp]
add rcx, 0x9100
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 + 0x9100]
mov rdx, rdi
mov r8d, eax
call fcn.140011040
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call rbx
test al, al
jne 0x140001e6f
mov rax, qword [rbp + 0x9290]
mov r14, qword [rbp + 0x92a0]
mov rcx, qword [rbp + 0x92a8]
cmp rcx, 0x10
mov r15, rdi
cmovae r15, rax
cmp r14, 0xe
jb 0x140001d50
cmp rcx, 0x10
cmovb rax, rdi
lea r12, [r14 + rax]
add r12, 0xfffffffffffffff3
mov r8, r12
sub r8, r15
mov rcx, r15
mov edx, 0x4c
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x140001d50
nop word cs:[rax + rax]
mov rcx, qword [rax]
xor rcx, r13
mov rdx, qword [rax + 6]
xor rdx, rsi
or rdx, rcx
je 0x140001e22
inc rax
mov r8, r12
sub r8, rax
mov rcx, rax
mov edx, 0x4c
call sub.VCRUNTIME140.dll_memchr
test rax, rax
jne 0x140001df0
jmp 0x140001d50
sub rax, r15
cmp rax, 0xffffffffffffffff
je 0x140001d50
mov rax, qword [rbp + 0x9288]
cmp rax, r14
jae 0x140001e52
lea rcx, [rbp + 0x9270]
mov rdx, r14
mov r9, r15
call fcn.14000d6f0
jmp 0x140001d50
lea r12, [rbp + 0x9270]
cmp rax, 0x10
jb 0x140001d2e
mov r12, qword [rbp + 0x9270]
jmp 0x140001d2e
mov rsi, qword [rbp + 0x92e8]
mov rcx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov qword [rbp + 0x92c0], rsi
mov qword [rbp + 0x92c8], rax
call fcn.1400322c0
lea rsi, [rbp + 0x9228]
lea r8, [rbp + 0x92c0]
mov rcx, rsi
mov edx, eax
call fcn.140010970
cmp qword [rbp + 0x9240], 8
jb 0x140001eba
mov rsi, qword [rbp + 0x9228]
lea rdx, [rbp + 0x92c0]
mov rcx, rsi
mov r8d, 3
mov r9d, 0xffffffff
call fcn.140031f98
xor esi, esi
cmp eax, 0x34
jg 0x140001ef1
lea ecx, [rax - 2]
cmp ecx, 2
jb 0x140001eff
test eax, eax
jne 0x140002642
mov sil, 1
jmp 0x140001eff
cmp eax, 0x35
je 0x140001eff
cmp eax, 0x7b
jne 0x140002642
mov rax, qword [rbp + 0x9240]
cmp rax, 8
jb 0x140001f4b
mov rcx, qword [rbp + 0x9228]
lea rdx, [rax + rax]
add rdx, 2
cmp rdx, 0x1000
jb 0x140001f46
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140002636
add rax, rax
add rax, 0x29
mov rdx, rax
mov rcx, r8
call fcn.140031ab8
test sil, sil
je 0x140001f7b
mov r8, qword [rbp + 0x9280]
cmp qword [rbp + 0x9260], r8
jne 0x140002020
cmp qword [rbp + 0x9268], 0x10
jb 0x140001ff2
mov rcx, qword [rbp + 0x9250]
jmp 0x140001ff9
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 + 0x92e8]
mov qword [rbp + 0x8fb0], rax
mov qword [rbp + 0x90e0], 0xc
lea rax, [rbp + 0x8fb0]
mov qword [rbp + 0x90e8], rax
lea rax, str._info__AutoUpdate:__is_missing__updating__n
mov qword [rbp + 0x90f0], rax
mov qword [rbp + 0x90f8], 0x2c
lea rcx, [rbp + 0x90f0]
lea rdx, [rbp + 0x90e0]
call fcn.1400194f0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x14000208f
lea rcx, [rbp + 0x9250]
cmp qword [rbp + 0x9288], 0x10
jb 0x14000200c
mov rdx, qword [rbp + 0x9270]
jmp 0x140002013
lea rdx, [rbp + 0x9270]
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x140002297
lea rdx, [0x140038c10]
lea rcx, [rbp + 0x9250]
call fcn.14000acf0
test al, al
je 0x140002064
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 rcx, str._info__AutoUpdate:_No_old_version_information_found__updating_just_in_case__n
call fcn.14000aca0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x14000208f
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 rcx, str._info__AutoUpdate:_New_version_found__updating__n
call fcn.14000aca0
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 + 0x92f4], ecx
cmp eax, 7
je 0x1400022dd
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, [0x14003679c]
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 + 0x92e8]
mov qword [rbp + 0x92c0], rax
mov qword [rbp + 0x9228], 0xc
lea rax, [rbp + 0x92c0]
mov qword [rbp + 0x9230], rax
lea rax, str._info__AutoUpdate:_Downloading_..._n
mov qword [rbp + 0x90d0], rax
mov qword [rbp + 0x90d8], 0x25
lea rcx, [rbp + 0x90d0]
lea rdx, [rbp + 0x9228]
call fcn.1400194f0
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, [0x140036c09]
lea rcx, [rbp + 0x92b8]
mov rdx, qword [rbp + 0x92e8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
test eax, eax
je 0x1400021d0
mov rcx, qword [rbp + 0x9248]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [rbp + 0x92e8], 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]
lea rcx, str._info__AutoUpdate:_Cant_write_new_file_n
call fcn.14000aca0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov dword [rbp + 0x92f4], 0
jmp 0x1400022d4
mov qword [rsp + 0x20], 0
lea r8, [rbp + 0x92b4]
lea r9, [rbp + 0x9220]
mov rcx, qword [rbp + 0x9210]
mov edx, 0x20000005
call qword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x140002207
mov dword [rbp + 0x92b4], 0
lea rsi, [rbp - 0x50]
lea rdi, [rbp + 0x92b0]
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 + 0x9210]
mov rdx, rsi
mov r8d, 0x8000
mov r9, rdi
call rbx
test eax, eax
je 0x1400025c5
mov r8d, dword [rbp + 0x92b0]
test r8, r8
je 0x140002264
mov r9, qword [rbp + 0x92b8]
mov edx, 1
mov rcx, rsi
call r14
cmp dword [rbp + 0x92b0], 0
jne 0x140002220
mov rcx, qword [rbp + 0x92b8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rcx, qword [rbp + 0x92b8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov dword [rbp + 0x92e8], 0
mov rcx, qword [rbp + 0x9248]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x1400022e7
mov dword [rbp + 0x92e8], 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]
lea rcx, str._info__AutoUpdate:_Running_latest_version__n
call fcn.14000aca0
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 + 0x92f4], ecx
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov dword [rbp + 0x92e8], 1
mov rax, qword [rbp + 0x92a8]
cmp rax, 0x10
jb 0x14000232c
mov rcx, qword [rbp + 0x9290]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140002327
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x14000263c
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.140031ab8
lea rsi, [rbp + 0x9198]
mov rax, qword [rbp + 0x9100]
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 + 0x9100], rcx
mov rax, qword [rbp + 0x9100]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0x98]
mov dword [rbp + rax + 0x90fc], ecx
lea rdi, [rbp + 0x9118]
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + 0x9118], rax
mov rcx, rdi
call fcn.14000bc30
mov rcx, rdi
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 0x140002416
mov rax, qword [rbp + 0x8fe8]
lea rcx, [rbp + 0x9040]
cmp qword [rax], rcx
jne 0x140002416
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 0x14000242e
mov rcx, rsi
call fcn.14000c440
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 + 0x92e8], 0
jne 0x1400017bc
mov dword [rsp + 0x20], 1
lea rdx, str.Overlunky.version
lea rcx, [rbp + 0x8fc0]
mov r8d, 2
mov r9d, 0x40
call fcn.14000a4e0
mov rsi, qword [rbp + 0x9208]
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 0x140002509
mov r8, qword [rbp + 0x9280]
cmp qword [rbp + 0x9288], 0x10
jb 0x1400024bc
mov rdx, qword [rbp + 0x9270]
jmp 0x1400024c3
lea rdx, [rbp + 0x9270]
lea rcx, [rbp + 0x8fc0]
call fcn.1400112c0
lea rcx, [rbp + 0x8fc8]
call fcn.14000c440
test rax, rax
jne 0x140002509
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 0x140002587
mov rax, qword [rbp + 0x8fe0]
lea rcx, [rbp + 0x9038]
cmp qword [rax], rcx
jne 0x140002587
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 0x14000259f
mov rcx, rsi
call fcn.14000c440
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 + 0x92f4], eax
jmp 0x1400017bc
mov rcx, qword [rbp + 0x92b8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rbp + 0x9248]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [rbp + 0x92e8], 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]
lea rcx, str._info__AutoUpdate:_Cant_read_file_from_github_n
call fcn.14000aca0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x1400021c1
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.14000b9b0
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 + 0x92c0], eax
lea rax, [0x140045448]
mov qword [rbp + 0x92c8], rax
lea rcx, str.exists
lea rdx, [rbp + 0x92c0]
lea r8, [rbp + 0x9228]
call fcn.14000d820
int3