Function at 0x406890
Capabilities:
Get file version info
Print debug messages

Disassembly:
push ebp
lea ebp, [esp - 0x864]
sub esp, 0x864
push 0xffffffffffffffff
push 0x497640
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x4c1280]
xor eax, ebp
mov dword [ebp + 0x860], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 0x86c]
push ecx
mov ecx, edi
mov dword [ebp - 0x14], edi
call fcn.004062f0
xor ebx, ebx
cmp eax, ebx
je 0x406bb8
cmp eax, 2
je 0x406b1c
push 0x206
lea ecx, [ebp + 0x65a]
xor eax, eax
push ebx
push ecx
mov word [ebp + 0x658], ax
call fcn.00472990
add esp, 0xc
push ebx
push edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
cmp esi, ebx
je 0x4069f8
mov dword [ebp - 4], ebx
xor ecx, ecx
lea ebx, [esi + 2]
mov eax, ebx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0047159e
mov edi, eax
add esp, 4
lea eax, [ebx + ebx]
push eax
push 0
push edi
mov dword [ebp - 4], 0xffffffff
call fcn.00472990
mov ecx, dword [ebp - 0x14]
add esp, 0xc
push edi
push esi
push 0
push ecx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x4069e2
lea edx, [ebp - 0x1c]
push edx
push 0x4c4b2c
push str.VarFileInfoTranslation
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x4069e2
mov eax, dword [0x4c4b2c]
movzx ecx, word [eax + 2]
movzx edx, word [eax]
push ecx
push edx
push str.StringFileInfo_04x_04xCompanyName
lea eax, [ebp + 0x658]
push 0x104
push eax
call fcn.00474cf2
add esp, 0x14
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp + 0x658]
push eax
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x4069e2
mov ecx, dword [ebp - 0x18]
push 9
push str.Microsoft
push ecx
call fcn.0047a3d8
add esp, 0xc
test eax, eax
je 0x406b1c
push edi
call fcn.0047311d
add esp, 4
xor ebx, ebx
jmp 0x406b2d
push 0x2e
push edi
call fcn.00473029
add esp, 8
cmp eax, ebx
je 0x406b2d
add eax, 2
mov edx, 0x4b1c48
mov ecx, eax
mov di, word [ecx]
cmp di, word [edx]
jne 0x406a3b
cmp di, bx
je 0x406a37
mov di, word [ecx + 2]
cmp di, word [edx + 2]
jne 0x406a3b
add ecx, 4
add edx, 4
cmp di, bx
jne 0x406a15
xor ecx, ecx
jmp 0x406a40
sbb ecx, ecx
sbb ecx, 0xffffffff
cmp ecx, ebx
je 0x406ad1
mov edx, 0x4b1c50
mov ecx, eax
nop
mov di, word [ecx]
cmp di, word [edx]
jne 0x406a76
cmp di, bx
je 0x406a72
mov di, word [ecx + 2]
cmp di, word [edx + 2]
jne 0x406a76
add ecx, 4
add edx, 4
cmp di, bx
jne 0x406a50
xor ecx, ecx
jmp 0x406a7b
sbb ecx, ecx
sbb ecx, 0xffffffff
cmp ecx, ebx
je 0x406ad1
mov edx, 0x4b1c58
mov ecx, eax
mov di, word [ecx]
cmp di, word [edx]
jne 0x406aac
cmp di, bx
je 0x406aa8
mov di, word [ecx + 2]
cmp di, word [edx + 2]
jne 0x406aac
add ecx, 4
add edx, 4
cmp di, bx
jne 0x406a86
xor ecx, ecx
jmp 0x406ab1
sbb ecx, ecx
sbb ecx, 0xffffffff
cmp ecx, ebx
je 0x406ad1
push str.manifest
push eax
call fcn.00476593
add esp, 8
test eax, eax
jne 0x406b2d
mov eax, 1
jmp 0x406bba
mov esi, dword [ebp - 0x14]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x406b26
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x406b2d
push esi
push str.sys:_s_n
lea edx, [ebp]
push 0x12c
push edx
call fcn.00474cf2
add esp, 0x10
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, 1
jmp 0x406bba
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x3fe
lea edx, [ebp + 0x25a]
xor ecx, ecx
push ebx
push edx
mov word [ebp + 0x258], cx
call fcn.00472990
add esp, 0xc
test byte [0x4c4f14], 1
jne 0x406b68
or dword [0x4c4f14], 1
push 0x4997a0
call fcn.004762ba
add esp, 4
mov esi, dword [ebp - 0x14]
lea edi, [ebp + 0x258]
call fcn.0041e8b0
mov eax, edi
push 0x4b1c84
push eax
call fcn.004772a8
add esp, 8
cmp eax, ebx
je 0x406b8f
add eax, 6
jmp 0x406b95
lea eax, [ebp + 0x258]
xor ecx, ecx
cmp cx, word [ebp + 0x258]
je 0x406bb8
push 9
push str.Microsoft
push eax
call fcn.0047a3d8
add esp, 0xc
test eax, eax
je 0x406b1c
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x860]
xor ecx, ebp
call fcn.00472a79
add ebp, 0x864
mov esp, ebp
pop ebp
ret 4