Function at 0x404057
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x10], ecx
push edi
mov edi, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x400
mov esi, 0x79ac00
add eax, 0x3e8
push esi
push ebx
mov dword [0x792c24], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 3
mov edx, 0x80000000
mov ecx, esi
call fcn.0040773c
mov esi, eax
mov dword [ebp - 4], esi
mov dword [0x40b018], esi
cmp esi, 0xffffffff
jne 0x4040b7
mov eax, str.Error_launching_installer
jmp 0x40425c
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x400
push 0x79ac00
push 0x799c00
call ebx
mov ecx, 0x799c00
call fcn.0040758d
push 0x400
push eax
push 0x79b000
call ebx
push 0x50d100
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ebx, dword [0x50d104]
xor eax, eax
mov esi, dword [0x50d100]
mov ecx, 0x100000
cmp ebx, eax
jl 0x404266
jg 0x404116
cmp esi, eax
jbe 0x404266
cmp dword [0x792c28], 0
mov edi, 0x200
cmovne edi, ecx
cmp ebx, eax
jg 0x404131
jl 0x40412f
cmp esi, edi
jae 0x404131
mov edi, esi
mov edx, edi
mov ecx, 0x50d1b0
call fcn.0040495d
test eax, eax
je 0x40424f
cmp dword [0x792c28], 0
jne 0x4041fa
push 0x20
lea eax, [ebp - 0x48]
push 0x50d1b0
push eax
call fcn.004084b0
mov ecx, dword [ebp - 0x48]
add esp, 0xc
test ecx, 0xffffffc0
jne 0x404207
cmp dword [ebp - 0x44], 0xdeadbeef
jne 0x404207
cmp dword [ebp - 0x38], 0x74736e49
jne 0x404207
cmp dword [ebp - 0x3c], 0x74666f73
jne 0x404207
cmp dword [ebp - 0x40], 0x6c6c754e
jne 0x404207
mov edx, dword [ebp - 0x10]
mov eax, dword [0x50d108]
or edx, ecx
mov dword [0x792c28], eax
mov eax, edx
and eax, 2
mov dword [ebp - 0x10], edx
or dword [0x792cc0], eax
cmp dword [ebp - 0x2c], ebx
jg 0x404257
jl 0x4041cd
cmp dword [ebp - 0x30], esi
ja 0x404257
test dl, 8
jne 0x4041db
test dl, 4
jne 0x404263
inc dword [ebp - 8]
mov esi, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x2c]
sub esi, 4
push 0
pop eax
sbb ebx, eax
cmp eax, ebx
jl 0x404207
jg 0x4041f6
cmp edi, esi
jbe 0x404207
mov edi, esi
jmp 0x404207
test byte [ebp - 0x10], 2
jne 0x404207
xor ecx, ecx
call fcn.00403ff7
cmp ebx, dword [0x50d104]
jg 0x40422a
jl 0x404219
cmp esi, dword [0x50d100]
jae 0x40422a
mov ecx, dword [ebp - 0xc]
mov edx, 0x50d1b0
push edi
call fcn.00401c94
mov dword [ebp - 0xc], eax
add dword [0x50d108], edi
push 0
pop eax
adc dword [0x50d10c], eax
sub esi, edi
sbb ebx, eax
js 0x404263
jg 0x404245
cmp esi, eax
jbe 0x404263
mov ecx, 0x100000
jmp 0x404116
xor ecx, ecx
inc ecx
call fcn.00403ff7
mov eax, str.Installer_integrity_check_has_failed._Common_causes_include_nincomplete_download_and_damaged_media._Contact_the_ninstallers_author_to_obtain_a_new_copy._n_nMore_information_at:_nhttp:__nsis.sf.net_NSIS_Error
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0xc]
xor ecx, ecx
inc ecx
call fcn.00403ff7
cmp dword [0x792c28], 0
je 0x404257
cmp dword [ebp - 8], 0
je 0x4042a2
push dword [0x50d10c]
push dword [0x50d108]
call fcn.00404b11
push 4
pop edx
lea ecx, [ebp - 0x18]
call fcn.0040495d
test eax, eax
je 0x404257
cmp edi, dword [ebp - 0x18]
jne 0x404257
push dword [ebp - 0x34]
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [0x792c28]
mov edi, eax
add ecx, 0x20
push 0
push ecx
call fcn.00404b11
push dword [ebp - 0x34]
mov edx, edi
xor ecx, ecx
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.0040462b
mov ecx, eax
mov esi, edx
mov eax, dword [ebp - 0x34]
cdq
cmp ecx, eax
jne 0x404257
cmp esi, edx
jne 0x404257
mov ebx, dword [ebp - 0x48]
mov eax, dword [edi]
mov dword [0x792c80], edi
mov dword [0x792800], eax
test bl, 1
je 0x404303
inc dword [0x792c20]
push 8
pop ecx
xor edx, edx
add ecx, 0xffffffff
mov eax, ecx
adc edx, 0xffffffff
add dword [edi + ecx*8 + 4], edi
or eax, edx
jne 0x404308
mov dword [0x50d198], eax
mov dword [0x50d19c], eax
mov dword [0x50d1a0], eax
test bl, 0x20
je 0x4045fd
xor ebx, ebx
inc ebx
push dword [0x40b018]
mov esi, 0x792820
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x400
push 0x79ac00
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x5c
push esi
call fcn.00408100
test eax, eax
push 0x2e
cmovne esi, eax
lea eax, [esi + 1]
push eax
call fcn.00407fd0
add esp, 0x10
jmp 0x404382
mov esi, eax
inc eax
push 0x2e
push eax
call fcn.00407fd0
pop ecx
pop ecx
test eax, eax
jne 0x404375
push ebx
push str.._u.dat
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov edx, 0x80000000
mov ecx, 0x792820
push 3
call fcn.0040773c
mov esi, eax
mov dword [ebp - 4], esi
mov dword [0x40b018], esi
cmp esi, 0xffffffff
je 0x4040ad
push 0x24
pop edx
lea ecx, [ebp - 0x6c]
call fcn.0040495d
test eax, eax
je 0x404257
cmp ebx, 1
jne 0x4043e3
mov eax, dword [ebp - 0x6c]
mov dword [0x50d100], eax
mov eax, dword [ebp - 0x68]
mov dword [0x50d104], eax
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x404257
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
add eax, 0x24
adc ecx, 0
cmp dword [ebp - 0x20], eax
jne 0x404257
cmp dword [ebp - 0x1c], ecx
jne 0x404257
cmp dword [ebp - 0x58], ebx
jne 0x404257
cmp dword [0x50d198], 0
push 0x28
push 0x40
jne 0x40443a
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, eax
mov dword [0x50d198], ecx
jmp 0x404449
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, eax
mov eax, dword [0x50d19c]
mov dword [eax], ecx
lea edx, [ecx + 4]
mov dword [0x50d19c], ecx
push 0x24
lea esi, [ebp - 0x6c]
pop ebx
sub esi, edx
mov al, byte [esi + edx]
dec ebx
mov byte [edx], al
inc edx
test ebx, ebx
jg 0x40445a
and dword [ecx], 0
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 4]
test eax, eax
je 0x404533
mov eax, dword [ebp - 0x50]
xor ecx, ecx
mov dword [ebp - 0xc], ecx
xorps xmm0, xmm0
movlpd qword [ebp - 0x28], xmm0
cmp eax, ecx
jl 0x404524
mov esi, dword [ebp - 0x54]
jg 0x40449b
cmp esi, ecx
jbe 0x404521
mov edx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x14], edx
mov ecx, esi
sub ecx, ebx
sbb eax, edx
test eax, eax
jg 0x4044bc
jl 0x4044b8
cmp ecx, 0x100000
jae 0x4044bc
sub esi, ebx
jmp 0x4044c1
mov esi, 0x100000
mov edx, esi
mov ecx, 0x40d100
call fcn.0040495d
test eax, eax
je 0x40424f
test byte [ebp - 0x10], 2
jne 0x4044e2
xor ecx, ecx
call fcn.00403ff7
mov ecx, dword [ebp - 0xc]
mov edx, 0x40d100
push esi
call fcn.00401c94
add dword [0x50d108], esi
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
push 0
pop eax
adc dword [0x50d10c], eax
add ebx, esi
adc edx, eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x14], edx
cmp edx, eax
jge 0x404518
mov esi, dword [ebp - 0x54]
jmp 0x4044a4
jg 0x404521
mov esi, dword [ebp - 0x54]
cmp ebx, esi
jb 0x4044a4
mov esi, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x4c], eax
jne 0x404257
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 0x18]
cmp ebx, dword [ebp - 0x5c]
jge 0x404541
inc ebx
jmp 0x404333
test eax, eax
je 0x40454d
xor ecx, ecx
inc ecx
call fcn.00403ff7
cmp ebx, 1
je 0x4045cb
push dword [0x40b018]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x400
push 0x79ac00
mov ebx, 0x792820
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x5c
push ebx
call fcn.00408100
test eax, eax
mov esi, ebx
push 0x2e
cmovne esi, eax
lea eax, [esi + 1]
push eax
call fcn.00407fd0
add esp, 0x10
jmp 0x4045a0
mov esi, eax
inc eax
push 0x2e
push eax
call fcn.00407fd0
pop ecx
pop ecx
test eax, eax
jne 0x404593
push 1
push str.._u.dat
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov edx, 0x80000000
mov ecx, ebx
push 3
call fcn.0040773c
mov esi, eax
mov dword [0x40b018], esi
mov eax, dword [0x50d198]
mov dword [0x50d19c], eax
xor eax, eax
push eax
push eax
push eax
push esi
mov dword [0x50d1a0], 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xorps xmm0, xmm0
mov dword [edi + 0x3c], eax
movlpd qword [0x50d1a8], xmm0
xor eax, eax
jmp 0x404600
mov esi, dword [ebp - 4]
push 1
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, 0x792c40
mov dword [edi + 0x3c], eax
push 0x40
sub edi, ecx
pop edx
mov al, byte [edi + ecx + 4]
dec edx
mov byte [ecx], al
inc ecx
test edx, edx
jg 0x404618
xor eax, eax
jmp 0x40425c