Function at 0x4047b0
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file via mapping

Disassembly:
push 0xffffffffffffffff
push 0x41ba10
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
push esi
mov esi, dword [esp + 0x8c]
mov eax, dword [esi]
push eax
mov dword [esp + 0x1c], 1
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4047fb
xor eax, eax
pop esi
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
add esp, 0x80
ret
mov eax, dword [esi]
push ebx
push ebp
xor ebp, ebp
push ebp
push 0x80
push 3
push ebp
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, ebp
mov dword [esp + 0x4c], ebx
je 0x40483c
lea eax, [esp + 0x2c]
push eax
push ebx
mov dword [esp + 0x34], ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x404853
cmp dword [esp + 0x2c], ebp
jne 0x404853
pop ebp
pop ebx
xor eax, eax
pop esi
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
add esp, 0x80
ret
mov eax, dword [esi]
sub eax, 0x10
push edi
push eax
call fcn.00401220
lea esi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x18], esi
mov dword [esp + 0x8c], ebp
xor edi, edi
mov ecx, dword [esi - 0xc]
lea eax, [edi + 1]
cmp eax, ebp
jl 0x40489e
cmp eax, ecx
jge 0x40489e
lea eax, [esi + eax*2]
push 0x5c
push eax
call fcn.004094f8
add esp, 8
cmp eax, ebp
je 0x40489e
sub eax, esi
sar eax, 1
cmp eax, ebp
jle 0x40489e
mov edi, eax
jmp 0x404872
cmp edi, ebp
jle 0x4048b2
push ebp
lea ecx, [esp + 0x1c]
call fcn.004012d0
lea esi, [eax + edi*2 + 2]
jmp 0x4048b6
mov esi, dword [esp + 0x50]
cmp esi, ebp
jne 0x4048be
xor eax, eax
jmp 0x4048c7
push esi
call fcn.00408c0d
add esp, 4
push eax
push esi
lea ecx, [esp + 0x20]
call fcn.00401300
push str._map
call fcn.00408c0d
add esp, 4
push eax
push str._map
lea ecx, [esp + 0x20]
call fcn.00401ee0
mov edi, dword [esp + 0x18]
push edi
push ebp
push ebp
push 2
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
cmp esi, ebp
mov dword [esp + 0x4c], esi
jne 0x404935
lea eax, [edi - 0x10]
mov dword [esp + 0x8c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40492e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
jmp 0x404de4
push ebp
push ebp
push ebp
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
push ebx
mov dword [esp + 0x48], ebx
call dword [sym.imp.imagehlp.dll_ImageNtHeader]
cmp eax, ebp
mov dword [esp + 0x48], eax
je 0x404e44
lea eax, [esp + 0x40]
push eax
push 1
push ebp
push ebx
mov dword [esp + 0x50], ebp
call dword [sym.imp.imagehlp.dll_ImageDirectoryEntryToData]
cmp eax, ebp
je 0x404dab
mov ecx, dword [eax + 0xc]
add eax, 0xc
cmp ecx, ebp
je 0x404dab
mov edi, dword [esp + 0x9c]
mov esi, eax
mov dword [esp + 0x3c], esi
jmp 0x404996
mov ebx, dword [esp + 0x44]
mov ecx, dword [esi]
mov edx, dword [esp + 0x48]
push ebp
push ecx
push ebx
push edx
call dword [sym.imp.imagehlp.dll_ImageRvaToVa]
push eax
lea ecx, [esp + 0x18]
call fcn.00403a90
mov eax, dword [edi + 8]
xor esi, esi
cmp eax, ebp
mov byte [esp + 0x8c], 1
jle 0x4049f7
cmp esi, ebp
jl 0x404dfd
cmp esi, eax
jge 0x404dfd
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x14]
lea eax, [eax + esi*4]
mov eax, dword [eax]
push eax
push ecx
call fcn.004093ed
add esp, 8
test eax, eax
je 0x404d6a
mov eax, dword [edi + 8]
inc esi
cmp esi, eax
jl 0x4049c1
mov eax, dword [edi + 8]
lea edx, [esp + 0x14]
push edx
push eax
mov ecx, edi
call fcn.00414ca8
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebp
jne 0x404d63
mov dword [esp + 0x28], ebp
call fcn.00415332
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea ecx, [eax + 0x10]
mov dword [esp + 0x10], ecx
mov ebx, dword [ecx - 4]
mov eax, dword [ecx - 8]
mov edx, 1
sub edx, ebx
mov ebx, 0x104
sub eax, ebx
or eax, edx
mov byte [esp + 0x8c], 2
jge 0x404a5f
push ebx
lea ecx, [esp + 0x14]
call fcn.004011d0
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 8], ebx
mov esi, ecx
jl 0x404e51
mov dword [ecx - 0xc], ebx
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push ecx
push esi
push ebx
mov word [eax + 0x208], bp
mov edx, dword [esp + 0x20]
push ebp
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SearchPathW]
cmp eax, ebp
jne 0x404cf0
call fcn.00415332
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x5c], eax
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], ebp
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], ebp
push str.SOFTWAREBusiness_ObjectsSuite_11.5Crystal_Reports
lea ecx, [esp + 0x38]
mov byte [esp + 0x90], 3
call fcn.004024c0
lea eax, [esp + 0x34]
push eax
push 0x80000002
lea ecx, [esp + 0x5c]
mov byte [esp + 0x94], 4
call fcn.004068b0
mov bl, al
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x8c], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b10
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, bl
je 0x404e21
call fcn.00415332
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
push 0x424788
lea ecx, [esp + 0x5c]
mov byte [esp + 0x94], 5
call fcn.004064d0
test al, al
je 0x404e18
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
push esi
push 0x104
push ebp
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SearchPathW]
cmp eax, ebp
jne 0x404caf
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x6c]
call fcn.00403700
push str.SOFTWAREBusiness_ObjectsSuite_11.5EnterpriseInstallRoot
lea ecx, [esp + 0x3c]
mov byte [esp + 0x90], 6
call fcn.004024c0
lea ecx, [esp + 0x38]
push ecx
push 0x80000002
lea ecx, [esp + 0x74]
mov byte [esp + 0x94], 7
call fcn.004068b0
lea ecx, [esp + 0x38]
mov bl, al
call fcn.004012b0
test bl, bl
je 0x404e07
lea ecx, [esp + 0x20]
call fcn.00401290
lea edx, [esp + 0x20]
push edx
push 0x42478c
lea ecx, [esp + 0x74]
mov byte [esp + 0x94], 8
call fcn.004064d0
test al, al
lea ecx, [esp + 0x20]
je 0x404e02
push 0x424790
call fcn.004024a0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x28]
push eax
push esi
push 0x104
push ebp
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SearchPathW]
cmp eax, ebp
jne 0x404c6e
lea ecx, [esp + 0x2c]
call fcn.00401290
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x94]
mov edx, dword [ecx]
push eax
push edx
lea eax, [esp + 0x34]
push str.Failed_to_register__s___Could_not_find_dependency_dll__s_n
push eax
mov byte [esp + 0x9c], 9
call fcn.004020a0
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.00403330
add esp, 0x14
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 1
call fcn.004012b0
jmp 0x404c93
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call fcn.00403250
mov eax, dword [esp + 0x94]
push edi
lea edx, [esp + 0x14]
push edx
push eax
call fcn.004047b0
add esp, 0xc
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x20]
call fcn.004012b0
lea ecx, [esp + 0x6c]
mov byte [esp + 0x8c], 5
call fcn.00403730
jmp 0x404cd4
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call fcn.00403250
mov edx, dword [esp + 0x94]
push edi
lea ecx, [esp + 0x14]
push ecx
push edx
call fcn.004047b0
add esp, 0xc
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x1c]
call fcn.004012b0
lea ecx, [esp + 0x54]
mov byte [esp + 0x8c], 2
call fcn.00403730
jmp 0x404d3b
mov ecx, dword [esp + 0x10]
cmp ecx, ebp
jne 0x404cfc
xor eax, eax
jmp 0x404d11
push ecx
call fcn.00408c0d
add esp, 4
cmp eax, ebp
jl 0x404e51
mov ecx, dword [esp + 0x10]
cmp eax, dword [ecx - 8]
jg 0x404e51
mov dword [ecx - 0xc], eax
mov ecx, dword [esp + 0x10]
push edi
lea edx, [esp + 0x14]
mov word [ecx + eax*2], bp
mov eax, dword [esp + 0x98]
push edx
push eax
call fcn.004047b0
add esp, 0xc
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x8c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404d6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x404d6a
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x14]
add esi, 0x14
add eax, 0xfffffff0
mov dword [esp + 0x3c], esi
mov byte [esp + 0x8c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404d9b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
cmp dword [esi], ebp
jne 0x404992
mov esi, dword [esp + 0x4c]
mov edi, dword [esp + 0x18]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [esp + 0x50]
push eax
call esi
lea eax, [edi - 0x10]
mov dword [esp + 0x8c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404de0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x84]
pop edi
pop ebp
pop ebx
pop esi
mov dword fs:[0], ecx
add esp, 0x80
ret
jmp fcn.004148be
call fcn.004012b0
lea ecx, [esp + 0x6c]
mov byte [esp + 0x8c], 5
call fcn.00403730
lea ecx, [esp + 0x1c]
call fcn.004012b0
lea ecx, [esp + 0x54]
mov byte [esp + 0x8c], 2
call fcn.00403730
lea ecx, [esp + 0x10]
call fcn.004012b0
lea ecx, [esp + 0x14]
call fcn.004012b0
lea ecx, [esp + 0x18]
call fcn.004012b0
xor eax, eax
jmp 0x404de4
push 0x80070057
call fcn.00401000
int3