Function at 0x51d160
Capabilities:
Get file version info

Disassembly:
sub esp, 0x1d4
mov eax, dword [0x59b000]
xor eax, esp
mov dword [esp + 0x1d0], eax
mov eax, dword [esp + 0x1d8]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
xor edi, edi
xor ebp, ebp
test eax, eax
jne 0x51d1b1
call fcn.00522040
mov esi, dword [0x5a28c4]
mov eax, esi
mov cx, word [0x598cc8]
and eax, 0x3ff
cmp cx, ax
je 0x51d1c0
test cx, cx
je 0x51d1c0
movzx esi, cx
jmp 0x51d1b4
movzx esi, ax
or esi, 0x800
mov dword [0x5a28c4], esi
mov eax, esi
and eax, 0x3ff
cmp eax, 9
je 0x51d4c3
push 0x104
call fcn.0054cb68
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x51d414
push esi
call fcn.00521ef0
mov esi, eax
test esi, esi
je 0x51d414
push 0x104
push ebx
push dword [0x5a438c]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, ebx
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x51d210
sub ecx, edx
add ecx, ebx
jmp 0x51d220
dec ecx
cmp byte [ecx], 0x2e
jne 0x51d220
mov byte [ecx + 1], 0x6c
mov edi, ecx
movzx eax, byte [esi]
mov byte [ecx + 2], al
movzx eax, byte [esi + 1]
mov byte [ecx + 3], al
mov byte [ecx + 4], 0
lea ecx, [ecx]
dec edi
cmp byte [edi], 0x5c
jne 0x51d240
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebp
push eax
push ebx
inc edi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebp
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
test esi, esi
je 0x51d414
push esi
call fcn.0054cb68
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x51d414
push ebp
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x51d414
push 0x44eed8
lea eax, [esp + 0x80]
push 0x64
push eax
call fcn.0054db28
add esp, 0xc
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x84]
push eax
push ebp
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x51d2cf
mov dword [0x5a28c4], 0x809
jmp 0x51d430
push edi
push dword [esp + 0x14]
call fcn.0054fee3
add esp, 8
test eax, eax
je 0x51d316
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push 1
push eax
push 0x46c
call fcn.00521fc0
push eax
lea eax, [esp + 0xec]
push eax
call fcn.00521e70
mov dword [0x5a28c4], 0x809
jmp 0x51d44c
push ebp
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x51d333
mov dword [0x5a28c4], 0x809
jmp 0x51d430
push 0x444a18
lea eax, [esp + 0x80]
push 0x64
push eax
call fcn.0054db28
add esp, 0xc
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x84]
push eax
push ebp
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x51d375
mov dword [0x5a28c4], 0x809
jmp 0x51d44c
cmp dword [esp + 0x18], 0x34
je 0x51d38b
mov dword [0x5a28c4], 0x809
jmp 0x51d430
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 8]
cmp ecx, 0x60032
ja 0x51d3b1
jb 0x51d3b1
push ebx
call fcn.00522010
test eax, eax
jne 0x51d4bd
mov eax, 0x46b
jmp 0x51d416
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
movzx eax, cx
push eax
shr ecx, 0x10
lea eax, [esp + 0x2c]
push ecx
push 0x44ef04
push eax
call esi
push 0x32
push 6
lea eax, [esp + 0x4c]
push 0x44ef04
push eax
call esi
add esp, 0x20
lea eax, [esp + 0x28]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x34]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
push 2
push eax
push 0x46d
call fcn.00521fc0
push eax
lea eax, [esp + 0xec]
push eax
call fcn.00521e70
mov eax, 0x46d
jmp 0x51d416
xor eax, eax
mov esi, 0x809
mov dword [0x5a28c4], esi
test eax, eax
je 0x51d4c3
cmp eax, 0x46b
jne 0x51d44c
push 0x46b
call fcn.00521fc0
push eax
lea eax, [esp + 0xe4]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
push 0x44ef0c
lea eax, [esp + 0xe4]
push 0xff
push eax
call fcn.0054fe47
add esp, 0xc
push 0xdf01
call fcn.00521fc0
push eax
lea eax, [esp + 0xe4]
push 0xff
push eax
call fcn.0054fe47
add esp, 0xc
mov dword [esp + 0x20], edi
lea eax, [esp + 0x20]
push 1
push eax
push 0xdf00
call fcn.00521fc0
push eax
lea eax, [esp + 0x54]
push eax
call fcn.00521e70
push 0x30
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0xe8]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, dword [0x5a28c4]
and esi, 0x3ff
mov word [0x598cc8], si
test ebp, ebp
je 0x51d4dd
push ebp
call fcn.00549ff4
add esp, 4
test ebx, ebx
je 0x51d4ea
push ebx
call fcn.00549ff4
add esp, 4
mov edx, dword [esp + 0x1e8]
pop edi
pop esi
pop ebp
pop ebx
test edx, edx
jne 0x51d513
lea eax, [edx + 1]
mov ecx, dword [esp + 0x1d0]
xor ecx, esp
call fcn.0054a992
add esp, 0x1d4
ret 4
movzx ecx, word [0x598cc8]
xor eax, eax
cmp edx, ecx
mov ecx, dword [esp + 0x1d0]
sete al
xor ecx, esp
call fcn.0054a992
add esp, 0x1d4
ret 4