Function at 0x403770
Capabilities:
Get file version info

Disassembly:
push 0xffffffffffffffff
push 0x435ad0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
mov ecx, dword [esp + 0x30]
push ebx
push ebp
push esi
lea eax, [esp + 0x1c]
push edi
xor ebx, ebx
push eax
push ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x28], ebx
xor esi, esi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov ebp, eax
cmp ebp, ebx
ja 0x4037b2
mov esi, 1
cmp esi, ebx
mov dword [esp + 0x14], ebx
jne 0x4037fa
push ebp
call dword [sym.imp.MSVCRT.dll_malloc]
mov edx, eax
add esp, 4
cmp edx, ebx
mov dword [esp + 0x14], edx
je 0x4037f5
mov ecx, ebp
xor eax, eax
mov ebx, ecx
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
push edx
mov edx, dword [esp + 0x44]
xor ebx, ebx
and ecx, 3
push ebp
push ebx
push edx
rep stosb byte es:[edi], al
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
jne 0x4037fa
mov esi, 1
cmp esi, ebx
mov dword [esp + 0x18], ebx
jne 0x403836
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x24]
push eax
push ecx
push 0x43e200
push edx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
jne 0x403827
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x403831
test dword [esp + 0x18], 0xfffffffc
ja 0x403836
mov esi, 1
mov eax, dword [0x43e040]
mov dword [esp + 0x10], eax
cmp esi, ebx
mov dword [esp + 0x34], ebx
jne 0x4039f7
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x24]
xor ecx, ecx
xor edx, edx
mov byte [esp + 0x34], 1
mov cx, word [eax + 2]
mov dx, word [eax]
push ecx
push edx
lea eax, [esp + 0x48]
push 0x43e1ac
push eax
call fcn.00403e30
mov eax, dword [esp + 0x50]
add esp, 0x10
xor esi, esi
mov ecx, dword [eax - 0xc]
lea ebp, [eax - 0xc]
cmp ecx, 1
jg 0x403895
cmp dword [eax - 4], ebx
jge 0x4038f7
mov ebx, dword [eax - 8]
test ebx, ebx
jle 0x40389e
mov esi, ebx
push esi
lea ecx, [esp + 0x44]
call fcn.00402b50
test eax, eax
je 0x4038f5
lea ecx, [ebx + ebx + 2]
lea edx, [esi + esi + 2]
cmp edx, ecx
jb 0x4038cd
mov edi, dword [esp + 0x40]
mov eax, ecx
lea esi, [ebp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x40]
mov dword [ecx - 8], ebx
mov eax, dword [0x43e044]
cmp ebp, eax
je 0x4038f1
push ebp
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4038f1
push ebp
call fcn.0042329e
add esp, 4
mov eax, dword [esp + 0x40]
xor ebx, ebx
lea edx, [esp + 0x28]
lea ecx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x18]
push ecx
push eax
push edx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x40395b
mov eax, dword [esp + 0x1c]
cmp eax, ebx
mov ebp, eax
jne 0x40391e
xor esi, esi
jmp 0x403927
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
push esi
lea ecx, [esp + 0x14]
call fcn.00404640
test eax, eax
je 0x40395b
mov ecx, dword [esp + 0x10]
lea edi, [esi + esi]
push edi
lea eax, [esi + esi + 2]
push ebp
push eax
push ecx
call fcn.004022a0
mov edx, dword [esp + 0x20]
add esp, 0x10
mov dword [edx - 8], esi
mov eax, dword [esp + 0x10]
mov word [edi + eax], bx
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx - 0xc]
lea esi, [ecx - 0xc]
cmp eax, 1
jle 0x4039a5
lea ecx, [esp + 0x40]
call fcn.00402c60
mov edx, dword [esi + 4]
lea ecx, [esp + 0x40]
push edx
call fcn.00402b50
test eax, eax
je 0x4039a5
mov eax, dword [esi + 4]
add esi, 0xc
lea ecx, [eax + eax + 2]
mov eax, dword [esp + 0x40]
push ecx
push esi
mov edx, dword [eax - 4]
lea ecx, [edx + edx + 2]
push ecx
push eax
call fcn.004022a0
add esp, 0x10
mov edx, dword [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x40]
mov byte [esp + 0x34], 0
mov dword [ecx - 8], eax
mov edx, dword [esp + 0x40]
mov word [edx + eax*2], bx
mov eax, dword [esp + 0x40]
mov edx, dword [0x43e044]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4039f3
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4039f3
mov edx, dword [esp + 0x40]
add edx, 0xfffffff4
push edx
call fcn.0042329e
add esp, 4
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x403a0d
push ecx
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x14]
add esp, 4
mov edx, dword [eax - 0xc]
mov esi, dword [esp + 0x3c]
lea ecx, [eax - 0xc]
cmp edx, ebx
jl 0x403a26
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x403a48
mov ecx, dword [0x43e040]
cmp eax, ebx
mov dword [esi], ecx
mov edi, eax
jne 0x403a38
xor eax, eax
jmp 0x403a3f
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
push eax
mov ecx, esi
call fcn.00404580
mov eax, dword [esp + 0x10]
mov ecx, dword [0x43e044]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x403a77
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x403a77
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
call fcn.0042329e
add esp, 4
mov ecx, dword [esp + 0x2c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x28
ret