Function at 0x407a50
Capabilities:
Check if file exists
Check os version

Disassembly:
sub esp, 0x2a4
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11d]
mov byte [esp + 0x11c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x18]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x407ce9
lea ecx, [esp + 0x18]
push 0x4420f4
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea edx, [esp + 0x18]
lea ecx, [esp + 0x11c]
mov esi, 0x104
lea eax, [esp + 0x11c]
sub edx, ecx
mov cl, byte [edx + eax]
test cl, cl
je 0x407adc
mov byte [eax], cl
inc eax
dec esi
jne 0x407acd
jmp 0x407ae0
test esi, esi
jne 0x407ae1
dec eax
mov byte [eax], 0
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x18]
lea ebp, [esp + 0x11c]
lea ebx, [esp + ecx + 0x18]
mov edx, ebx
sub ebp, ebx
sub edx, eax
cmp ebp, 0x7fffffff
lea edi, [esp + edx + 0x11c]
mov dword [esp + 0x10], edi
ja 0x407b40
test ebp, ebp
mov esi, ebp
mov eax, ebx
je 0x407b40
mov edx, 0x4420e0
sub edx, ebx
mov cl, byte [edx + eax]
test cl, cl
je 0x407b38
mov byte [eax], cl
inc eax
dec esi
jne 0x407b29
jmp 0x407b3c
test esi, esi
jne 0x407b3d
dec eax
mov byte [eax], 0
lea esi, [esp + 0x220]
sub esi, edi
cmp esi, 0x7fffffff
mov dword [esp + 0x14], esi
ja 0x407b79
test esi, esi
mov eax, edi
je 0x407b79
mov edx, 0x4420cc
sub edx, edi
mov cl, byte [edx + eax]
test cl, cl
je 0x407b71
mov byte [eax], cl
inc eax
dec esi
jne 0x407b62
jmp 0x407b75
test esi, esi
jne 0x407b76
dec eax
mov byte [eax], 0
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x224]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x220]
mov dword [esp + 0x220], 0x94
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x224]
cmp eax, 5
jne 0x407bd6
mov eax, dword [esp + 0x228]
sub eax, 0
je 0x407bd2
dec eax
je 0x407bcb
dec eax
jne 0x407ce9
mov esi, 2
jmp 0x407be4
mov esi, 1
jmp 0x407be4
xor esi, esi
jmp 0x407be4
cmp eax, 6
jne 0x407ce9
mov esi, 3
xor edx, edx
push 0
mov dx, word [esi*8 + 0x4412a8]
push 0
lea eax, [esp + 0x20]
push edx
push eax
call fcn.00407750
add esp, 0x10
test eax, eax
je 0x407ce9
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
lea ecx, [esp + 0x18]
push ecx
call edi
test eax, eax
je 0x407ce9
xor edx, edx
push 0
mov dx, word [esi*8 + 0x4412ac]
push 0
lea eax, [esp + 0x124]
push edx
push eax
call fcn.00407750
add esp, 0x10
test eax, eax
je 0x407ce9
lea ecx, [esp + 0x18]
push ecx
call edi
test eax, eax
je 0x407ce9
lea edx, [esp + 0x11c]
lea eax, [esp + 0x18]
push edx
push eax
push 0
call fcn.004079c0
add esp, 0xc
test eax, eax
jne 0x407cf6
cmp ebp, 0x7fffffff
ja 0x407ca0
test ebp, ebp
mov esi, ebp
mov eax, ebx
je 0x407ca0
mov edx, 0x4420b8
sub edx, ebx
mov cl, byte [edx + eax]
test cl, cl
je 0x407c98
mov byte [eax], cl
inc eax
dec esi
jne 0x407c89
jmp 0x407c9c
test esi, esi
jne 0x407c9d
dec eax
mov byte [eax], 0
mov esi, dword [esp + 0x14]
cmp esi, 0x7fffffff
ja 0x407cd2
mov eax, dword [esp + 0x10]
test esi, esi
je 0x407cd2
mov edx, 0x4420a8
sub edx, eax
mov cl, byte [edx + eax]
test cl, cl
je 0x407cca
mov byte [eax], cl
inc eax
dec esi
jne 0x407cbb
jmp 0x407cce
test esi, esi
jne 0x407ccf
dec eax
mov byte [eax], 0
lea ecx, [esp + 0x11c]
lea edx, [esp + 0x18]
push ecx
push edx
push 0
call fcn.004079c0
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2a4
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2a4
ret