Function at 0x404004
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
xor ebx, ebx
sub esp, 0x4c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x3e8
mov dword [0x41b920], eax
mov eax, dword [0x40c8b4]
mov dword [esp + 8], 0x400
lea edi, [eax + 0xd800]
mov dword [esp], ebx
mov dword [esp + 4], edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub esp, 0xc
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], edi
call fcn.00407cab
mov esi, eax
mov dword [0x40b010], eax
sub esp, 0xc
mov eax, 0x40c192
cmp esi, 0xffffffff
je 0x40430a
mov eax, dword [0x40c8b4]
mov dword [esp + 4], edi
lea ebx, [eax + 0xb800]
mov dword [esp], ebx
call fcn.00408179
push ecx
push ecx
mov dword [esp], ebx
call fcn.00407a84
push ebx
mov dword [esp + 4], eax
mov eax, dword [0x40c8b4]
lea ebx, [eax + 0xe000]
mov dword [esp], ebx
call fcn.00408179
xor eax, eax
push edi
push edi
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ecx, ecx
push edx
mov edi, eax
push edx
mov dword [0x42fa2c], eax
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
test edi, edi
je 0x4041ad
cmp dword [0x41b928], 1
mov dword [esp], 0x427980
sbb ebx, ebx
and ebx, 0xffff8200
add ebx, 0x8000
cmp edi, ebx
cmovbe ebx, edi
mov dword [esp + 4], ebx
call fcn.00403d19
push edx
push edx
test eax, eax
jne 0x404116
mov dword [esp], 1
call fcn.00403c8b
jmp 0x404197
cmp dword [0x41b928], 0
jne 0x4041d1
lea eax, [ebp - 0x34]
mov dword [esp + 8], 0x1c
mov dword [esp], eax
mov dword [esp + 4], 0x427980
call fcn.00407bf5
mov eax, dword [ebp - 0x34]
sub esp, 0xc
cmp eax, 0xf
ja 0x4041e1
cmp dword [ebp - 0x30], 0xdeadbeef
jne 0x4041e1
cmp dword [ebp - 0x24], 0x74736e49
jne 0x4041e1
cmp dword [ebp - 0x28], 0x74666f73
jne 0x4041e1
cmp dword [ebp - 0x2c], 0x6c6c754e
jne 0x4041e1
or dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [0x42fa28]
and eax, 2
or dword [0x419040], eax
mov eax, dword [ebp - 0x1c]
mov dword [0x41b928], ecx
cmp edi, eax
jae 0x4041a1
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
jmp 0x40430a
test byte [ebp + 8], 8
jne 0x4041c4
test byte [ebp + 8], 4
je 0x4041c4
mov dword [esp], 1
call fcn.00403c8b
cmp dword [0x41b928], 0
jne 0x404213
jmp 0x404197
lea edi, [eax - 4]
inc dword [ebp - 0x40]
cmp ebx, edi
cmova ebx, edi
jmp 0x4041e1
test byte [ebp + 8], 2
jne 0x4041e1
xor ecx, ecx
mov dword [esp], ecx
call fcn.00403c8b
cmp edi, dword [0x42fa2c]
jae 0x404206
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x427980
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call fcn.00408dec
mov dword [ebp - 0x3c], eax
sub esp, 0xc
add dword [0x42fa28], ebx
sub edi, ebx
jmp 0x4040cd
cmp dword [ebp - 0x40], 0
je 0x404250
mov eax, dword [0x42fa28]
mov dword [esp], eax
call fcn.00403d41
push eax
lea eax, [ebp - 0x38]
mov dword [esp + 4], 4
mov dword [esp], eax
call fcn.00403d19
push edx
push edx
test eax, eax
je 0x404197
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x38], eax
jne 0x404197
mov eax, dword [ebp - 0x20]
mov dword [esp], 0x40
xor edi, edi
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
push edx
push edx
mov eax, dword [0x41b928]
add eax, 0x1c
mov dword [esp], eax
call fcn.00403d41
push ecx
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], edi
mov dword [esp], 0xffffffff
call fcn.00403d6d
sub esp, 0x10
cmp eax, dword [ebp - 0x20]
jne 0x404197
mov dword [0x41b930], ebx
mov eax, dword [ebx]
mov dword [0x41b92c], eax
test byte [ebp - 0x34], 1
je 0x4042bb
inc dword [0x41b924]
mov eax, 7
add dword [ebx + eax*8 + 4], ebx
sub eax, 1
jae 0x4042c0
xor eax, eax
mov dword [esp + 0xc], 1
add ebx, 4
mov dword [esp + 8], eax
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esp, 0x10
mov dword [ebx + 0x38], eax
mov dword [esp + 8], 0x40
mov dword [esp + 4], ebx
mov dword [esp], 0x41b940
call fcn.00407bf5
xor eax, eax
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4