Function at 0x401167
Capabilities:
Check os version
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
push ebx
push esi
lea eax, [ebp - 0x98]
push edi
push eax
mov dword [ebp - 0x98], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [ebp - 0x88]
xor ebx, ebx
sub eax, ebx
je 0x4012aa
dec eax
je 0x40125c
dec eax
jne 0x4012b4
cmp dword [ebp - 0x94], 6
jb 0x4011c0
mov dword [0x432160], 0x30501
jmp 0x4012b4
cmp dword [ebp - 0x94], 5
jb 0x401250
cmp dword [ebp - 0x90], 2
jb 0x4011e5
mov dword [0x432160], 0x30401
jmp 0x4012b4
cmp dword [ebp - 0x90], 1
jb 0x401232
lea eax, [ebp - 0x84]
push str.Service_Pack_2
push eax
call fcn.0040e8f8
pop ecx
test eax, eax
pop ecx
jne 0x401214
mov dword [0x432160], 0x30303
jmp 0x4012b4
lea eax, [ebp - 0x84]
push str.Service_Pack_1
push eax
call fcn.0040e8f8
neg eax
pop ecx
sbb eax, eax
pop ecx
add eax, 0x30302
jmp 0x40128d
lea eax, [ebp - 0x84]
push str.Service_Pack_1
push eax
call fcn.0040e8f8
neg eax
pop ecx
sbb eax, eax
pop ecx
add eax, 0x30202
jmp 0x40128d
mov dword [0x432160], 0x30101
jmp 0x4012b4
cmp dword [ebp - 0x90], 0x5a
jb 0x401271
mov dword [0x432160], 0x20301
jmp 0x4012b4
cmp dword [ebp - 0x90], ebx
jbe 0x401294
mov eax, 0x7d0
cmp eax, dword [ebp - 0x8c]
sbb eax, eax
neg eax
add eax, 0x20201
mov dword [0x432160], eax
jmp 0x4012b4
mov eax, 0x3e8
cmp eax, dword [ebp - 0x8c]
sbb eax, eax
neg eax
add eax, 0x20101
jmp 0x40128d
mov dword [0x432160], 0x101
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_IsWindowUnicode]
test eax, eax
je 0x4012f1
mov edi, 0x104
mov esi, 0x431e54
push edi
push esi
push ebx
mov dword [0x432378], 1
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push esi
call fcn.004030ae
cmp eax, esi
pop ecx
jbe 0x401317
dec eax
dec eax
jmp 0x401325
mov edi, 0x43205c
push 0x104
push edi
push ebx
mov dword [0x432378], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push edi
call fcn.004030f6
cmp eax, edi
pop ecx
jbe 0x401337
dec eax
jmp 0x401340
push esi
call fcn.0040e8db
pop ecx
lea eax, [eax*2 + 0x431e54]
push esi
push edi
mov edi, 0x43205c
mov word [eax], bx
push edi
call fcn.00401535
jmp 0x401354
push edi
call fcn.0040e860
pop ecx
add eax, edi
and byte [eax], 0
push edi
mov esi, 0x431e54
push 0x208
push esi
call fcn.00401472
add esp, 0xc
mov ebx, 0x432168
push esi
push ebx
call fcn.0040e743
mov esi, 0x431d50
push edi
push esi
call fcn.0040e770
push 1
call fcn.00401441
add esp, 0x14
test eax, eax
je 0x40143c
push ebx
mov ebx, 0x431634
push ebx
call fcn.0040e743
mov edi, 0x43183c
push esi
push edi
call fcn.0040e770
add esp, 0x10
cmp dword [0x432378], 0
je 0x4013ae
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x4013b5
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov esi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0xc
push eax
mov dword [ebp - 4], eax
call esi
push 8
mov dword [0x432164], eax
push dword [ebp - 4]
call esi
push 0xa
mov dword [0x431308], eax
push dword [ebp - 4]
call esi
push dword [ebp - 4]
xor esi, esi
mov dword [0x43130c], eax
push esi
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebx
mov ebx, 0x431b48
push ebx
call fcn.0040e743
push edi
mov edi, 0x431a44
push edi
call fcn.0040e770
add esp, 0x10
cmp dword [0x432378], esi
je 0x40141f
push ebx
call fcn.00402ec6
jmp 0x401425
push edi
call fcn.00402fba
cmp eax, 3
pop ecx
jne 0x401439
and byte [0x431a44], 0
mov word [0x431b48], si
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret