Function at 0x40397c
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edi, dword [ebp + 8]
call sub.KERNEL32.dll_GetTickCount
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x7aec00
mov dword [esp], 0
add eax, 0x3e8
mov dword [0x7a43ec], eax
call sub.KERNEL32.dll_GetModuleFileNameA
sub esp, 0xc
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x7aec00
call fcn.004077f6
mov dword [ebp - 0x3c], eax
sub esp, 0xc
cmp dword [ebp - 0x3c], 0xffffffff
mov dword [0x40a010], eax
mov eax, 0x40b149
je 0x403cb4
mov dword [esp + 4], 0x7aec00
mov dword [esp], 0x7adc00
call fcn.00407312
push eax
push eax
mov dword [esp], 0x7adc00
call fcn.00407296
push esi
mov dword [esp + 4], eax
mov dword [esp], 0x7af000
call fcn.00407312
mov eax, dword [ebp - 0x3c]
push ebx
push ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.KERNEL32.dll_GetFileSize
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
push ecx
mov ebx, eax
push ecx
mov dword [0x421c48], eax
jmp 0x403b76
cmp dword [0x7a441c], 1
sbb esi, esi
and esi, 0xffff8200
add esi, 0x8000
cmp esi, ebx
jle 0x403a6b
mov esi, ebx
mov dword [esp + 4], esi
mov dword [esp], 0x419c44
call fcn.0040360d
test eax, eax
push edx
push edx
jne 0x403a92
mov dword [esp], 1
call fcn.004038e4
jmp 0x403caf
cmp dword [0x7a441c], 0
jne 0x403b2d
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 0x419c44
call fcn.00406f86
mov eax, dword [ebp - 0x38]
sub esp, 0xc
test eax, 0xfffffff0
jne 0x403b41
cmp dword [ebp - 0x34], 0xdeadbeef
jne 0x403b41
cmp dword [ebp - 0x28], 0x74736e49
jne 0x403b41
cmp dword [ebp - 0x2c], 0x74666f73
jne 0x403b41
cmp dword [ebp - 0x30], 0x6c6c754e
jne 0x403b41
or edi, eax
mov edx, dword [0x421c4c]
mov eax, edi
and eax, 2
or dword [0x7a435c], eax
mov eax, dword [ebp - 0x20]
mov dword [0x7a441c], edx
cmp eax, ebx
jg 0x403caf
test edi, 8
jne 0x403b1f
test edi, 4
jne 0x403b7e
lea ebx, [eax - 4]
inc dword [ebp - 0x40]
cmp esi, ebx
mov edx, ebx
ja 0x403b43
jmp 0x403b41
test edi, 2
jne 0x403b41
mov dword [esp], 0
call fcn.004038e4
mov edx, esi
cmp ebx, dword [0x421c48]
jge 0x403b6e
mov eax, dword [ebp - 0x44]
mov dword [esp + 8], edx
mov dword [ebp - 0x48], edx
mov dword [esp + 4], 0x419c44
mov dword [esp], eax
call fcn.00407f7c
mov edx, dword [ebp - 0x48]
sub esp, 0xc
mov dword [ebp - 0x44], eax
add dword [0x421c4c], edx
sub ebx, edx
test ebx, ebx
jg 0x403a50
mov dword [esp], 1
call fcn.004038e4
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
cmp dword [0x7a441c], 0
je 0x403cb4
cmp dword [ebp - 0x40], 0
je 0x403bd9
mov eax, dword [0x421c4c]
mov dword [esp], eax
call fcn.004035dc
lea eax, [ebp - 0x1c]
push ecx
mov dword [esp + 4], 4
mov dword [esp], eax
call fcn.0040360d
test eax, eax
push edx
push edx
je 0x403caf
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x1c]
jne 0x403caf
mov eax, dword [ebp - 0x24]
mov dword [esp], 0x40
mov dword [esp + 4], eax
call sub.KERNEL32.dll_GlobalAlloc
mov ebx, eax
mov eax, dword [0x7a441c]
push edi
push edi
add eax, 0x1c
mov dword [esp], eax
call fcn.004035dc
mov eax, dword [ebp - 0x24]
push esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0xffffffff
call fcn.00403658
mov edx, eax
sub esp, 0x10
cmp edx, dword [ebp - 0x24]
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
jne 0x403cb4
mov dword [0x7a439c], ebx
mov eax, dword [ebx]
mov edx, dword [ebp - 0x38]
mov dword [0x7a43fc], eax
mov eax, dword [0x7a440c]
and edx, 1
cmp edx, 1
sbb eax, 0xffffffff
mov dword [0x7a440c], eax
mov eax, 8
dec eax
add dword [ebx + eax*8 + 4], ebx
test eax, eax
jne 0x403c5b
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.KERNEL32.dll_SetFilePointer
mov dword [ebx + 0x3c], eax
sub esp, 0x10
add ebx, 4
mov dword [esp + 8], 0x40
mov dword [esp + 4], ebx
mov dword [esp], 0x7a43ac
call fcn.00406f86
xor eax, eax
sub esp, 0xc
jmp 0x403cb4
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
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4