Function at 0x47e880
Capabilities:
Check if file exists
Check os version
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5276de
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
mov al, byte [esp + 1]
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esp + 0x30], esi
lea ebp, [esi + 0x108]
mov byte [ebp], al
mov dword [ebp + 4], ebx
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], ebx
mov dword [esp + 0x70], ebx
mov dword [esi + 0x11c], ebx
mov dword [esi], ebx
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 6
sbb ecx, ecx
add esi, 4
inc ecx
xor eax, eax
mov dword [esi + 0x114], ecx
mov ecx, 0x41
mov edi, esi
rep stosd dword es:[edi], eax
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 8]
push 0x104
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push esi
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
inc eax
lea ecx, [esp + 0x20]
mov byte [eax], bl
call sub.MFC42.DLL_CString::CString_3
push esi
lea edx, [esp + 0x24]
push 0x566510
push edx
mov byte [esp + 0x7c], 1
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x2c]
add esp, 0xc
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x47e95d
lea ecx, [esp + 0x20]
mov byte [esp + 0x70], bl
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, dword [esp + 0x30]
cmp eax, ebx
mov dword [esi + 0x11c], eax
je 0x47ed66
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x18]
mov byte [esp + 0x70], 2
push ecx
call fcn.00416d50
add esp, 4
test eax, eax
jl 0x47ed1b
push ecx
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
call fcn.004c73e6
lea ecx, [esp + 0x48]
call fcn.004366d0
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x44]
mov esi, eax
mov byte [esp + 0x70], 3
mov edi, dword [eax]
lea eax, [esp + 0x12]
push eax
call fcn.00436900
push eax
push esi
call dword [edi + 0x104]
test eax, eax
jl 0x47ed3b
cmp word [esp + 0x12], bx
je 0x47ed3b
mov dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x2c]
push edx
push eax
mov ecx, dword [eax]
mov byte [esp + 0x78], 4
call dword [ecx + 0xb4]
test eax, eax
mov eax, dword [esp + 0x2c]
jl 0x47ed30
cmp eax, ebx
je 0x47ed30
mov dword [esp + 0x28], ebx
mov ecx, dword [eax]
lea edx, [esp + 0x28]
push edx
push eax
mov byte [esp + 0x78], 5
call dword [ecx + 0x30]
test eax, eax
mov eax, dword [esp + 0x28]
jl 0x47eceb
cmp eax, ebx
je 0x47eceb
lea edx, [esp + 0x38]
mov dword [esp + 0x38], ebx
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x20]
test eax, eax
jl 0x47eca8
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], ebx
cmp eax, ebx
jle 0x47ec86
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov edi, dword [sym.imp.MSVCRT.dll__mbscmp]
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x38]
mov ecx, dword [eax]
push edx
push eax
mov byte [esp + 0x7c], 6
call dword [ecx + 0x1c]
test eax, eax
mov eax, dword [esp + 0x14]
jl 0x47ec62
cmp eax, ebx
je 0x47ec62
mov dword [esp + 0x1c], ebx
mov ecx, dword [eax]
lea edx, [esp + 0x1c]
push edx
push eax
mov byte [esp + 0x78], 7
call dword [ecx + 0x1c]
test eax, eax
jl 0x47ec46
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x3c]
push edx
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [eax]
push str.System
push eax
call edi
add esp, 8
lea ecx, [esp + 0x3c]
test eax, eax
setne byte [esp + 0x11]
call sub.MFC42.DLL_CString::CString
cmp byte [esp + 0x11], bl
jne 0x47ec46
mov dword [esp + 0x24], ebx
push 0x566508
lea ecx, [esp + 0x44]
mov byte [esp + 0x74], 8
call sub.MFC42.DLL_CString::CString_2
lea edx, [esp + 0x24]
mov byte [esp + 0x70], 9
push edx
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.0047eef0
add esp, 0xc
lea ecx, [esp + 0x40]
test eax, eax
sete byte [esp + 0x11]
mov byte [esp + 0x70], 8
call sub.MFC42.DLL_CString::CString
cmp byte [esp + 0x11], bl
je 0x47eb6a
mov ecx, dword [esp + 0x24]
push ecx
call esi
mov edx, dword [esp + 0x1c]
push edx
call esi
mov eax, dword [esp + 0x14]
mov byte [esp + 0x70], 5
cmp eax, ebx
je 0x47ec71
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x47ec71
lea ecx, [esp + 0x54]
call sub.MFC42.DLL_CString::CString_3
mov dl, byte [esp + 0x11]
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x58], dl
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x54]
push eax
mov byte [esp + 0x74], 0xa
call fcn.004c7548
lea ecx, [esp + 0x54]
lea edx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x34]
push edx
call fcn.0047f120
test eax, eax
jne 0x47ebee
lea ecx, [esp + 0x58]
mov byte [esp + 0x70], 0xb
call fcn.0047f910
lea ecx, [esp + 0x54]
mov byte [esp + 0x70], 8
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x24]
push eax
call esi
mov ecx, dword [esp + 0x1c]
push ecx
call esi
mov eax, dword [esp + 0x14]
mov byte [esp + 0x70], 5
cmp eax, ebx
je 0x47ec71
jmp 0x47ec6b
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x54]
push ecx
push 1
push eax
mov ecx, ebp
call fcn.00480040
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x5c]
push edx
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0x78], 0xc
call fcn.0047fc80
mov ecx, dword [esp + 0x5c]
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x54]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov byte [esp + 0x70], 8
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x24]
push edx
call esi
mov eax, dword [esp + 0x1c]
push eax
call esi
mov eax, dword [esp + 0x14]
mov byte [esp + 0x70], 5
cmp eax, ebx
je 0x47ec71
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x47ec71
cmp eax, ebx
mov byte [esp + 0x70], 5
je 0x47ec71
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
inc eax
cmp eax, ecx
mov dword [esp + 0x34], eax
jl 0x47ea74
mov eax, dword [esp + 0x28]
mov byte [esp + 0x70], 4
cmp eax, ebx
je 0x47ec99
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x70], 3
cmp eax, ebx
je 0x47ecce
jmp 0x47ecc8
mov eax, dword [esp + 0x28]
mov byte [esp + 0x70], 4
cmp eax, ebx
je 0x47ecbb
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x70], 3
cmp eax, ebx
je 0x47ecce
mov edx, dword [eax]
push eax
call dword [edx + 8]
lea ecx, [esp + 0x44]
mov byte [esp + 0x70], 2
call fcn.004368f0
mov eax, dword [esp + 0x18]
mov byte [esp + 0x70], 1
cmp eax, ebx
je 0x47ed5c
jmp 0x47ed56
cmp eax, ebx
mov byte [esp + 0x70], 4
je 0x47ecfa
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x70], 3
cmp eax, ebx
je 0x47ed0d
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [esp + 0x44]
mov byte [esp + 0x70], 2
call fcn.004368f0
mov eax, dword [esp + 0x18]
mov byte [esp + 0x70], 1
cmp eax, ebx
je 0x47ed5c
mov edx, dword [eax]
push eax
call dword [edx + 8]
jmp 0x47ed5c
cmp eax, ebx
mov byte [esp + 0x70], 3
je 0x47ed0d
jmp 0x47ed07
lea ecx, [esp + 0x44]
mov byte [esp + 0x70], 2
call fcn.004368f0
mov eax, dword [esp + 0x18]
mov byte [esp + 0x70], 1
cmp eax, ebx
je 0x47ed5c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov esi, dword [esp + 0x30]
mov dword [esi], 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x70], bl
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x68]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x64
ret