Function at 0x402a1d
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2cc
mov eax, dword [0x425410]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2a4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x288], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp + 0x14]
push ebx
mov dword [ebp - 0x2c4], eax
mov ebx, ecx
xor eax, eax
push esi
mov dword [ebp - 0x2b0], eax
mov byte [ebp - 0x26b], al
mov dword [ebp - 0x2a0], eax
lea eax, [ebp - 0x2a4]
push edi
push eax
call fcn.004041a9
neg al
mov ecx, ebx
sbb al, al
inc al
mov byte [ebx + 8], al
lea eax, [ebp - 0x288]
push eax
call fcn.004041a9
push 0x10000
call fcn.00404dbb
xor ecx, ecx
mov dword [ebp - 0x28c], eax
inc ecx
mov dword [ebp - 0x284], 0x50
xor eax, eax
mov dword [ebp - 0x270], ecx
push ecx
push ecx
mov dword [ebp - 0x27c], eax
mov dword [ebp - 0x290], eax
mov byte [ebp - 0x26a], al
mov byte [ebp - 0x269], al
lea eax, [ebp - 0x60]
push str.HTTP__u._u
push eax
mov dword [ebp - 0x2c0], ecx
mov dword [ebp - 0x2bc], ecx
call fcn.00401cc3
add esp, 0x14
mov dword [ebp - 0x2cc], 0x41c89c
cmp dword [ebx + 0x58], 0
lea eax, [ebp - 0x20]
mov esi, str.ConEmu_Update
lea edi, [ebp - 0x20]
cmovne eax, dword [ebx + 0x58]
push 7
pop ecx
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x280], eax
lea ecx, [ebp - 0x298]
xor eax, eax
mov dword [ebp - 0x2c8], eax
call fcn.00405e5d
xor eax, eax
mov ecx, ebx
cmp dword [ebx + 4], eax
jne 0x402b3f
call fcn.00403ff4
test al, al
je 0x403578
jmp 0x402b45
push eax
call fcn.00401ed3
mov edi, dword [ebp - 0x2a4]
xor eax, eax
push eax
push edi
push 2
push str.File_download_requested__s
push 2
push ebx
call fcn.00404667
mov esi, dword [sym.imp.KERNEL32.dll_ResetEvent]
add esp, 0x18
push dword [ebx + 0x80]
call esi
push dword [ebx + 0x88]
call esi
mov eax, dword [ebp - 0x2a8]
xor ecx, ecx
mov dword [ebx + 0x40], ecx
mov dword [ebx + 0x3c], ecx
mov byte [ebx + 0xa], cl
or dword [eax], 0xffffffff
cmp byte [ebx + 8], cl
je 0x402c95
push 0xe
push str.http:__
push edi
call fcn.00406eb7
add esp, 0xc
test eax, eax
jne 0x402bb3
mov byte [ebp - 0x26a], al
lea esi, [edi + 0xe]
jmp 0x402c1a
xor edx, edx
mov esi, str.https:__
mov ecx, edx
mov eax, dword [edi + ecx*4]
cmp eax, dword [esi + ecx*4]
jne 0x402be0
inc ecx
cmp ecx, 4
jne 0x402bbc
mov byte [ebp - 0x26a], 1
lea esi, [edi + 0x10]
mov dword [ebp - 0x284], 0x1bb
jmp 0x402c1a
cmp dword [edi], 0x740066
jne 0x402ce7
cmp dword [edi + 4], 0x3a0070
jne 0x402ce7
cmp dword [edi + 8], 0x2f002f
jne 0x402ce7
mov byte [ebp - 0x269], 1
lea esi, [edi + 0xc]
mov dword [ebp - 0x284], 0x15
push 0x2f
pop eax
push eax
push esi
call fcn.00406d4e
pop ecx
pop ecx
mov ecx, eax
mov dword [ebp - 0x2b4], ecx
test ecx, ecx
je 0x402cd6
cmp ecx, esi
je 0x402cd6
sub eax, esi
sar eax, 1
cmp eax, 0x104
jge 0x402cd6
xor edx, edx
cmp word [ecx + 2], dx
jne 0x402c6d
push edx
push edi
push 2
push str.Invalid_server_path_specified__n_s
push edx
push ebx
call fcn.00404667
add esp, 0x18
jmp 0x403578
inc eax
push eax
push esi
lea eax, [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
xor eax, eax
push eax
push dword [ebp - 0x2b4]
call fcn.00405f71
pop ecx
pop ecx
mov dword [ebp - 0x290], eax
xor ecx, ecx
test edi, edi
je 0x403568
cmp word [edi], cx
je 0x403568
mov eax, dword [ebp - 0x288]
test eax, eax
je 0x403568
cmp word [eax], cx
je 0x403568
cmp dword [ebp - 0x28c], 0
jne 0x402cf5
push ecx
push 0x10000
push 1
push str.Failed_to_allocate_memory___u_bytes_
push ecx
jmp 0x402c5f
xor eax, eax
push eax
push edi
push 2
push str.Invalid_server__domain__specified__n_t_s
push eax
jmp 0x402c5f
push edx
push edi
push 2
push str.Only_http_addresses_are_supported__n_t_s
jmp 0x402c5e
push 0x41ca7c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
test eax, eax
sete byte [ebp - 0x275]
test eax, eax
jne 0x402d1e
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x402d34
xor eax, eax
push eax
push eax
push 2
push eax
push 1
push 0x40000000
push dword [ebp - 0x288]
call esi
mov dword [ebp - 0x2a0], eax
test eax, eax
je 0x40354a
cmp eax, 0xffffffff
je 0x40354a
mov al, byte [ebp - 0x275]
xor al, 1
cmp byte [ebx + 8], 0
mov byte [ebp - 0x26b], al
je 0x403402
mov eax, dword [ebx + 0x44]
xor ecx, ecx
test eax, eax
je 0x402d89
cmp word [eax], cx
je 0x402d83
mov dword [ebp - 0x270], 3
mov dword [ebp - 0x27c], eax
jmp 0x402d89
mov dword [ebp - 0x270], ecx
cmp byte [ebx + 0x98], 0
jne 0x403578
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebx + 0xc], ecx
jne 0x402f15
push ecx
push dword [ebp - 0x280]
push 2
push str.Open_internet_with_agent_name__s
push 2
push ebx
call fcn.00404667
add esp, 0x18
xor ecx, ecx
cmp byte [ebx + 9], cl
mov eax, 0x10000000
cmovne ecx, eax
mov eax, dword [ebx + 4]
push ecx
push 0
push dword [ebp - 0x27c]
mov dword [ebp - 0x274], ecx
push dword [ebp - 0x270]
push dword [ebp - 0x280]
call dword [eax + 0x14]
mov dword [ebx + 0xc], eax
test eax, eax
jne 0x402e05
call esi
xor ecx, ecx
push ecx
push eax
push 1
push str.Network_initialization_failed__code_u
jmp 0x402cd3
push 0
push eax
push 1
push str.Internet_opened_x_08X
push 2
push ebx
call fcn.00404667
add esp, 0x18
cmp byte [ebx + 9], 0
je 0x402e54
mov eax, dword [ebx + 4]
push 0x4038b5
push dword [ebx + 0xc]
call dword [eax + 0x24]
mov dword [ebx + 0x18], eax
cmp eax, 0xffffffff
jne 0x402e54
xor eax, eax
push eax
call esi
push eax
push 1
push str.Failed_to_set_internet_status_callback__code_u
xor eax, eax
push eax
push ebx
call fcn.00404667
add esp, 0x18
xor eax, eax
mov byte [ebx + 9], al
cmp byte [ebx + 0x98], 0
jne 0x403578
cmp dword [ebp - 0x27c], 0
je 0x402e7c
push dword [ebx + 0xc]
mov ecx, ebx
call fcn.004048b5
test al, al
je 0x403578
xor eax, eax
push eax
push dword [ebp - 0x2bc]
push 1
push dword [ebp - 0x2c0]
push 1
push str.Set_protocol_version___u._u_
push 2
push ebx
call fcn.00404667
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x2c0]
add esp, 0x20
push 8
push ecx
push 0x3b
push dword [ebx + 0xc]
call dword [eax + 0x1c]
test eax, eax
jne 0x402ec9
push eax
call esi
push eax
push 1
push str.HttpVersion_failed__code_u
xor eax, eax
jmp 0x402ce1
xor eax, eax
push eax
push str.Set_IGNORE_OFFLINE_option
push 2
push ebx
call fcn.00404667
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x274]
add esp, 0x10
mov dword [ebp - 0x274], 1
push 4
push ecx
push 0x4d
push dword [ebx + 0xc]
call dword [eax + 0x1c]
test eax, eax
jne 0x402f15
push eax
call esi
push eax
push 1
push str.Set_IGNORE_OFFLINE_option__code_u
xor eax, eax
push eax
push ebx
call fcn.00404667
add esp, 0x18
mov ecx, ebx
call fcn.00404999
test al, al
je 0x403578
lea eax, [ebp - 0x268]
push 0x3a
push eax
call fcn.00406e15
mov dword [ebp - 0x2ac], eax
pop ecx
pop ecx
test eax, eax
je 0x402f6c
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x2ac]
push 0xa
push eax
mov eax, dword [ebp - 0x2ac]
add eax, 2
push eax
call fcn.0040c34f
movzx eax, ax
add esp, 0xc
test ax, ax
je 0x402f6c
mov dword [ebp - 0x284], eax
movzx eax, byte [ebp - 0x269]
xor ecx, ecx
xor eax, 1
mov dword [ebp - 0x274], ecx
push ecx
lea esi, [eax*2 + 1]
mov eax, dword [ebp - 0x284]
push esi
push 1
movzx eax, ax
push eax
push 1
lea eax, [ebp - 0x268]
push eax
push 2
push str.Connecting_to_server__s:_u___u_
push 2
push ebx
call fcn.00404667
add esp, 0x28
lea eax, [ebx + 0x1c]
lea ecx, [ebp - 0x298]
push 0xffffffffffffffff
push eax
call fcn.00405ed0
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x268]
push ebx
push dword [ebp - 0x274]
push esi
push dword [ebx + 0x54]
push dword [ebx + 0x50]
push dword [ebp - 0x284]
push ecx
push dword [ebx + 0xc]
call dword [eax + 0x10]
push eax
mov ecx, ebx
call fcn.004036b7
mov dword [ebx + 0x10], eax
test eax, eax
jne 0x403031
xor edx, edx
cmp dword [ebp + 0x18], edx
je 0x40357a
cmp dword [ebp - 0x270], 0x2eef
mov eax, str.Authorization_failed__code_u
push edx
push dword [ebp - 0x270]
mov ecx, str.Connection_failed__code_u
push 1
cmovne eax, ecx
push eax
jmp 0x402c5e
xor esi, esi
push esi
push eax
push 1
push str.Connect_opened_x_08X
push 2
push ebx
call fcn.00404667
add esp, 0x18
cmp dword [ebp - 0x27c], esi
je 0x403061
push dword [ebx + 0x10]
mov ecx, ebx
call fcn.004048b5
test al, al
je 0x403578
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x2c0]
push 8
push ecx
push 0x3b
push dword [ebx + 0x10]
call dword [eax + 0x1c]
test eax, eax
jne 0x403085
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x402eba
cmp byte [ebx + 0x98], 0
jne 0x403578
cmp byte [ebp - 0x269], 0
je 0x403245
push 0x2f
pop eax
push eax
push dword [ebp - 0x290]
mov byte [ebx + 0xa], 1
call fcn.00406e15
mov edx, dword [ebp - 0x290]
mov esi, eax
pop ecx
pop ecx
cmp esi, edx
jne 0x4030c6
xor eax, eax
mov esi, eax
jmp 0x4030cf
test esi, esi
je 0x4030cf
xor eax, eax
mov word [esi], ax
test esi, esi
mov eax, 0x41cdd0
cmovne eax, edx
mov dword [ebp - 0x280], eax
je 0x4030ec
lea eax, [esi + 2]
mov dword [ebp - 0x27c], eax
jmp 0x403106
push 0x2f
pop edi
cmp word [edx], di
lea eax, [edx + 2]
mov edi, dword [ebp - 0x2a4]
mov ecx, edx
cmove ecx, eax
mov dword [ebp - 0x27c], ecx
push 0xffffffffffffffff
lea eax, [ebx + 0x1c]
push eax
lea ecx, [ebp - 0x298]
call fcn.00405ed0
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x270]
push eax
push dword [ebp - 0x280]
mov eax, dword [ebx + 4]
push dword [ebx + 0x10]
call dword [eax + 0x28]
push eax
mov ecx, ebx
call fcn.00403731
test al, al
jne 0x40317a
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
push dword [ebp - 0x280]
xor eax, eax
push 2
push str.Ftp_set_directory_failed__s__code_u
push eax
push ebx
call fcn.00404667
add esp, 0x20
xor edx, edx
test esi, esi
je 0x40357a
push 0x2f
pop eax
mov word [esi], ax
jmp 0x40357a
test esi, esi
je 0x403184
push 0x2f
pop eax
mov word [esi], ax
push 0xffffffffffffffff
lea eax, [ebx + 0x1c]
mov dword [ebp - 0x274], 2
push eax
lea ecx, [ebp - 0x298]
call fcn.00405ed0
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebx + 4]
push ebx
push dword [ebp - 0x274]
push 0x80000000
push dword [ebp - 0x27c]
push dword [ebx + 0x10]
call dword [eax + 0x2c]
push eax
mov ecx, ebx
call fcn.004036b7
push 0
push eax
push 1
push str.Ftp_file_opened_x_08X
push 2
push ebx
mov dword [ebx + 0x14], eax
call fcn.00404667
add esp, 0x18
test esi, esi
je 0x4031f2
push 0x2f
pop eax
mov word [esi], ax
cmp dword [ebx + 0x14], 0
je 0x403208
cmp dword [ebx + 0x14], 0xffffffff
je 0x403208
xor eax, eax
mov dword [ebx + 0x3c], eax
jmp 0x40346a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp + 0x18], 0
mov ecx, eax
je 0x403578
xor eax, eax
mov edx, str.Ftp_open_file_failed_nURL_s_ncode_u
push eax
mov eax, str.Ftp_open_file_failed_nURL_s_ncode_u__Internet_is_offline_
push ecx
push 1
push edi
cmp ecx, 2
push 2
cmovne eax, edx
push eax
xor eax, eax
push eax
push ebx
call fcn.00404667
add esp, 0x20
jmp 0x403578
cmp byte [ebp - 0x26a], 0
mov ecx, 0x84803100
push esi
mov eax, 0x84000100
cmovne eax, ecx
push eax
push 1
push str.Opening_request_with_flags_x_08X
push 2
push ebx
mov dword [ebp - 0x274], eax
call fcn.00404667
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x2cc]
add esp, 0x18
push ebx
push dword [ebp - 0x274]
push ecx
push esi
lea ecx, [ebp - 0x60]
push ecx
push dword [ebp - 0x290]
push 0x41cf5c
push dword [ebx + 0x10]
call dword [eax]
mov dword [ebx + 0x14], eax
test eax, eax
je 0x4033df
cmp eax, 0xffffffff
je 0x4033df
push esi
push eax
push 1
push str.Http_file_opened_x_08X
push 2
push ebx
call fcn.00404667
xor eax, eax
push eax
push str.Sending_request
push 2
push ebx
call fcn.00404667
add esp, 0x28
push dword [ebx + 0x88]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0xffffffffffffffff
lea esi, [ebx + 0x1c]
push esi
lea ecx, [ebp - 0x298]
call fcn.00405ed0
lea eax, [ebp - 0x298]
xor ecx, ecx
push eax
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebx + 4]
push ecx
push ecx
push ecx
push ecx
push dword [ebx + 0x14]
call dword [eax + 8]
push eax
mov ecx, ebx
call fcn.00403731
test al, al
jne 0x40333b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp + 0x18], 0
je 0x403578
xor ecx, ecx
push ecx
push edi
push 2
push eax
push 1
push str.HttpSendRequest_failed__code_u_n_tURL_s
push ecx
jmp 0x403237
xor ecx, ecx
mov dword [ebp - 0x280], 4
push ecx
mov eax, 0x20000005
mov dword [ebx + 0x3c], ecx
push eax
push 1
push str.Quering_file_info_with_flags_x_08X
push 2
push ebx
mov dword [ebp - 0x2b4], ecx
mov dword [ebp - 0x274], eax
call fcn.00404667
add esp, 0x18
lea ecx, [ebp - 0x298]
push 0xffffffffffffffff
push esi
call fcn.00405ed0
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x270]
push eax
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x2b4]
push ecx
lea ecx, [ebp - 0x280]
push ecx
lea ecx, [ebx + 0x3c]
push ecx
push dword [ebp - 0x274]
push dword [ebx + 0x14]
call dword [eax + 4]
push eax
mov ecx, ebx
call fcn.00403731
test al, al
jne 0x4033cd
xor eax, eax
push eax
push dword [ebp - 0x270]
push 1
push str.Warning:_Quering_file_info_failed__code_u
jmp 0x40345c
xor eax, eax
push eax
push dword [ebx + 0x3c]
push 1
push str.File_length_retrieved:__u_bytes
jmp 0x40345f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
cmp dword [ebp + 0x18], esi
je 0x403578
xor eax, eax
mov edx, str.HttpOpenRequest_failed_nURL_s_ncode_u
push eax
mov eax, str.HttpOpenRequest_failed_nURL_s_ncode_u__Internet_is_offline_
jmp 0x403227
xor eax, eax
push eax
push str.Opening_source_from_file_system
push 2
push ebx
call fcn.00404667
add esp, 0x10
xor eax, eax
push eax
push eax
push 3
push eax
push 1
push 0x80000000
push edi
call esi
mov dword [ebx + 0x14], eax
test eax, eax
je 0x403531
cmp eax, 0xffffffff
je 0x403531
lea ecx, [ebp - 0x2b8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40346a
mov eax, dword [ebp - 0x2b8]
push 0
push eax
push 1
push str.File_length:__u_bytes
mov dword [ebx + 0x3c], eax
push 2
push ebx
call fcn.00404667
add esp, 0x18
cmp byte [ebx + 0x98], 0
jne 0x403578
mov esi, dword [ebp - 0x2a0]
lea eax, [ebp - 0x29c]
mov ecx, ebx
push eax
movzx eax, byte [ebx + 8]
push 0x10000
push dword [ebp - 0x28c]
push dword [ebx + 0x14]
push eax
push edi
call fcn.00404522
test eax, eax
je 0x403578
cmp dword [ebp - 0x29c], 0
je 0x403508
push dword [ebp - 0x2a8]
push dword [ebp - 0x29c]
push dword [ebp - 0x28c]
call fcn.00401e95
push dword [ebp - 0x29c]
mov ecx, ebx
push dword [ebp - 0x28c]
push esi
push dword [ebp - 0x288]
call fcn.00404c27
test eax, eax
je 0x403578
mov eax, dword [ebp - 0x29c]
mov ecx, ebx
add dword [ebx + 0x40], eax
call fcn.00404c0f
cmp byte [ebx + 0x98], 0
je 0x40347d
jmp 0x403578
xor edx, edx
cmp dword [ebx + 0x40], edx
jne 0x40351d
push edx
push edi
push 2
push str.Invalid_source_url__s__file_is_empty_or_not_found
jmp 0x402c5e
mov eax, dword [ebp - 0x2a8]
mov dword [ebp - 0x2b0], 1
not dword [eax]
jmp 0x40357a
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
push edi
push 2
push str.Failed_to_open_source_file__s___code_u
jmp 0x403234
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
push dword [ebp - 0x288]
push 2
push 0x41ca80
jmp 0x403234
push ecx
push str.DownloadFile._Invalid_arguments
push ecx
push ebx
call fcn.00404667
add esp, 0x10
xor edx, edx
mov ecx, dword [ebp - 0x2c4]
mov edi, dword [ebp - 0x2b0]
mov eax, dword [ebx + 0x40]
push edx
mov dword [ecx], eax
test edi, edi
je 0x4035a5
push eax
push 1
push str.Download_finished___u_bytes_retrieved
push 2
push ebx
call fcn.00404667
add esp, 0x18
jmp 0x4035b5
push str.Download_failed
push 2
push ebx
call fcn.00404667
add esp, 0x10
cmp byte [ebx + 8], 0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4035d3
test edi, edi
mov ecx, ebx
sete al
movzx eax, al
push eax
call fcn.00401ed3
jmp 0x4035e7
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x4035e2
cmp eax, 0xffffffff
je 0x4035e2
push eax
call esi
xor eax, eax
mov dword [ebx + 0x14], eax
cmp byte [ebp - 0x26b], 0
je 0x403602
mov eax, dword [ebp - 0x2a0]
test eax, eax
je 0x403602
cmp eax, 0xffffffff
je 0x403602
push eax
call esi
mov eax, dword [ebp - 0x28c]
test eax, eax
je 0x403613
push eax
call fcn.00404d7b
pop ecx
mov eax, dword [ebp - 0x290]
test eax, eax
je 0x403624
push eax
call fcn.00404d7b
pop ecx
lea ecx, [ebp - 0x298]
call fcn.00405e94
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004061df
leave
ret 0x14