Function at 0x40ce54
Capabilities:
Check os version
Get hostname

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdb4
push ebx
push esi
push edi
mov eax, 0x5b60dc
call fcn.005496a0
push 0
call sub.ole32.dll_CoInitialize
mov esi, 0x5afd1d
lea edi, [ebp - 0x24c]
mov ecx, 0x3f
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
push 0xff
lea eax, [ebp - 0x24c]
push eax
call sub.wsock32.dll_gethostname
push 0
call fcn.0043d244
pop ecx
call fcn.0043d1ac
mov word [ebp - 0x13a], ax
mov word [ebp - 0x128], 0x14
mov edx, 0x5b0dbc
lea eax, [ebp - 8]
call fcn.005499e4
inc dword [ebp - 0x11c]
mov word [ebp - 0x128], 8
mov word [ebp - 0x128], 0x20
mov edx, 0x5b0dbf
lea eax, [ebp - 0xc]
call fcn.005499e4
inc dword [ebp - 0x11c]
mov word [ebp - 0x128], 8
mov word [ebp - 0x128], 0x2c
mov word [ebp - 0x128], 0x38
mov edx, 0x5b0dc4
lea eax, [ebp - 0x14]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea edx, [ebp - 0x14]
push edx
mov edx, 0x5b0dc0
lea eax, [ebp - 0x18]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0x18]
push ecx
call fcn.0043d4ec
push eax
call fcn.0043e9b0
add esp, 0xc
test al, al
je 0x40cfb7
mov edx, 0x5b0dd1
lea eax, [ebp - 0x1c]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0x1c]
push ecx
mov edx, 0x5b0dcd
lea eax, [ebp - 0x20]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0x20]
push ecx
call fcn.0043d4ec
push eax
call fcn.0043e9b0
add esp, 0xc
test al, al
setne al
and eax, 1
push eax
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00549c08
pop ecx
test ecx, ecx
jne 0x40cfbb
xor eax, eax
jmp 0x40cfc0
mov eax, 1
push eax
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00549c08
pop ecx
test cl, cl
je 0x40d147
mov word [ebp - 0x128], 0x50
mov edx, 0x5b0ddd
lea eax, [ebp - 0x28]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0x28]
push ecx
lea eax, [ebp - 0x2c]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0x2c]
push edx
call fcn.0043d4ec
push eax
lea eax, [ebp - 0x24]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043ec10
add esp, 0x10
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00549c08
mov word [ebp - 0x128], 0x44
lea eax, [ebp - 0x24]
call fcn.004053e4
test al, al
jne 0x40d08c
lea edx, [ebp - 0x24]
lea eax, [ebp - 8]
call fcn.00549c38
mov word [ebp - 0x128], 0x5c
mov edx, 0x5b0de6
lea eax, [ebp - 0x30]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea edx, [ebp - 0x30]
push edx
lea eax, [ebp - 0x34]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0x34]
push edx
call fcn.0043d4ec
push eax
lea eax, [ebp - 0x38]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043ec10
add esp, 0x10
lea edx, [ebp - 0x38]
lea eax, [ebp - 0xc]
call fcn.00549c38
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00549c08
mov word [ebp - 0x128], 0x2c
jmp 0x40d4a5
call sub.kernel32.dll_GetVersion
mov dword [ebp - 0x140], eax
mov word [ebp - 0x128], 0x2c
mov cl, byte [ebp - 0x140]
and cl, 0xff
xor eax, eax
mov al, cl
mov dword [ebp - 0x144], eax
cmp dword [ebp - 0x144], 6
jae 0x40d4a5
mov word [ebp - 0x128], 0x68
mov edx, 0x5b0df2
lea eax, [ebp - 0x3c]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea edx, [ebp - 0x3c]
push edx
lea eax, [ebp - 0x40]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0x40]
push edx
call fcn.0043d4ec
push eax
call fcn.0043f35c
add esp, 0xc
test al, al
je 0x40d238
mov edx, 0x5b0dfb
lea eax, [ebp - 0x44]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0x44]
push ecx
lea eax, [ebp - 0x48]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0x48]
push edx
call fcn.0043d4ec
push eax
call fcn.0043f35c
add esp, 0xc
test al, al
setne cl
and ecx, 1
push ecx
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x48]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.00549c08
pop ecx
test ecx, ecx
jne 0x40d23c
xor eax, eax
jmp 0x40d241
mov eax, 1
push eax
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.00549c08
pop ecx
test cl, cl
je 0x40d4a5
mov word [ebp - 0x128], pe_nt_image_headers32
mov edx, 0x5b0e07
lea eax, [ebp - 0x50]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0x50]
push ecx
lea eax, [ebp - 0x54]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0x54]
push edx
call fcn.0043d4ec
push eax
lea eax, [ebp - 0x4c]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043f48c
add esp, 0x10
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x54]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x50]
mov edx, 2
call fcn.00549c08
mov word [ebp - 0x128], 0x74
lea eax, [ebp - 0x4c]
call fcn.004053e4
test al, al
jne 0x40d30d
lea edx, [ebp - 0x4c]
lea eax, [ebp - 8]
call fcn.00549c38
mov word [ebp - 0x128], 0x8c
mov edx, 0x5b0e10
lea eax, [ebp - 0x58]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea edx, [ebp - 0x58]
push edx
lea eax, [ebp - 0x5c]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0x5c]
push edx
call fcn.0043d4ec
push eax
lea eax, [ebp - 0x60]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043f48c
add esp, 0x10
lea edx, [ebp - 0x60]
lea eax, [ebp - 0xc]
call fcn.00549c38
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x60]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x5c]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x58]
mov edx, 2
call fcn.00549c08
lea ecx, [ebp - 8]
push ecx
mov word [ebp - 0x128], 0x98
mov edx, 0x5b0e1c
lea eax, [ebp - 0x64]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0x64]
push ecx
lea eax, [ebp - 0x68]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0x68]
push edx
call fcn.0043d4ec
push eax
call fcn.0043f048
add esp, 0x10
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x68]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x64]
mov edx, 2
call fcn.00549c08
lea ecx, [ebp - 0xc]
push ecx
mov word [ebp - 0x128], 0xa4
mov edx, 0x5b0e25
lea eax, [ebp - 0x6c]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0x6c]
push ecx
lea eax, [ebp - 0x70]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0x70]
push edx
call fcn.0043d4ec
push eax
call fcn.0043f048
add esp, 0x10
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x70]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x6c]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x4c]
mov edx, 2
call fcn.00549c08
mov word [ebp - 0x128], 0x2c
mov word [ebp - 0x128], 8
jmp 0x40d4f5
mov word [ebp - 0x128], 0xbc
mov edx, 0x5b0e47
lea eax, [ebp - 0x78]
call fcn.005499e4
inc dword [ebp - 0x11c]
push dword [eax]
call fcn.00444c28
pop ecx
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x78]
mov edx, 2
call fcn.00549c08
mov word [ebp - 0x128], 0xc8
movzx edx, word [ebp - 0x13a]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xf0]
call sym.SDERPService.exe__TServerChannel_SetPortA_qqri
mov word [ebp - 0x128], 0xd4
lea edx, [ebp - 0x24c]
lea eax, [ebp - 0x7c]
call fcn.005499e4
mov edx, eax
inc dword [ebp - 0x11c]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xf4]
add eax, 0x5c
call fcn.00549c38
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x7c]
mov edx, 2
call fcn.00549c08
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xf0]
mov dl, 1
call sym.SDERPService.exe__TServerChannel_SetActive_qqro
mov word [ebp - 0x128], 0xe0
lea eax, [ebp - 0x80]
call fcn.00401fbc
mov edx, eax
inc dword [ebp - 0x11c]
movzx eax, word [ebp - 0x13a]
call sub.rtl60.bpl__Sysutils_IntToStr_qqri
lea edx, [ebp - 0x80]
push edx
lea eax, [ebp - 0x84]
call fcn.00401fbc
mov ecx, eax
inc dword [ebp - 0x11c]
mov eax, 0x5b0e5d
pop edx
call fcn.0054a1ac
lea ecx, [ebp - 0x84]
push ecx
lea eax, [ebp - 0x8c]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
mov edx, 0x5b0e76
lea eax, [ebp - 0x88]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea edx, [ebp - 0x88]
pop ecx
pop eax
call fcn.00549c60
lea edx, [ebp - 0x8c]
push edx
lea eax, [ebp - 0x94]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
lea edx, [ebp - 0x24c]
lea eax, [ebp - 0x90]
call fcn.005499e4
mov edx, eax
inc dword [ebp - 0x11c]
pop ecx
pop eax
call fcn.00549c60
lea edx, [ebp - 0x94]
push dword [edx]
call fcn.00444c28
pop ecx
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x94]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x90]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x8c]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x88]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x84]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x80]
mov edx, 2
call fcn.00549c08
mov word [ebp - 0x128], 8
jmp 0x40d89e
mov byte [ebp - 0x145], 0
mov word [ebp - 0x128], 8
xor edx, edx
mov dword [ebp - 0x14c], edx
mov word [ebp - 0x128], 0xf8
push dword [ebp - 0xc]
push dword [ebp - 8]
mov edx, 0x5b0ea3
lea eax, [ebp - 0xb0]
call fcn.005499e4
inc dword [ebp - 0x11c]
push dword [eax]
lea edx, [ebp - 0x24c]
lea eax, [ebp - 0xb4]
call fcn.005499e4
inc dword [ebp - 0x11c]
push dword [eax]
push dword [ebp + 8]
lea eax, [ebp - 0x10]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0040ef84
add esp, 0x18
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xb4]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xb0]
mov edx, 2
call fcn.00549c08
mov word [ebp - 0x128], 8
cmp dword [ebp - 0x14c], 3
jge 0x40df76
mov word [ebp - 0x128], 0x104
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x104]
call sub.dbrtl60.bpl__Db_TCustomConnection_Close_qqrv
mov word [ebp - 0x128], 0x110
lea edx, [ebp - 0x10]
lea eax, [ebp - 0xb8]
call fcn.0054bf30
inc dword [ebp - 0x11c]
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x104]
call sub.adortl60.bpl__Adodb_TADOConnection_SetConnectionString_qqrx17System_WideString
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xb8]
mov edx, 2
call fcn.0054bfa4
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x104]
mov byte [eax + 0x3c], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x104]
call fcn.0040dfe0
mov word [ebp - 0x128], 0x11c
mov edx, 0x5b0eaa
lea eax, [ebp - 0xbc]
call fcn.005499e4
inc dword [ebp - 0x11c]
push dword [eax]
call fcn.00444c28
pop ecx
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xbc]
mov edx, 2
call fcn.00549c08
mov word [ebp - 0x128], 0x128
lea edx, [ebp - 0x24c]
lea eax, [ebp - 0xc0]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0xc0]
push ecx
call fcn.0043d198
pop ecx
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xc0]
mov edx, 2
call fcn.00549c08
mov cx, word [ebp - 0x13a]
push ecx
call fcn.0043d244
pop ecx
lea eax, [ebp - 8]
push eax
call fcn.0043d28c
pop ecx
lea edx, [ebp - 0xc]
push edx
call fcn.0043d2d8
pop ecx
lea ecx, [ebp - 8]
push ecx
mov word [ebp - 0x128], 0x134
mov edx, 0x5b0ebb
lea eax, [ebp - 0xc4]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0xc4]
push ecx
lea eax, [ebp - 0xc8]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0xc8]
push edx
call fcn.0043d4ec
push eax
call fcn.0043f048
add esp, 0x10
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xc8]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xc4]
mov edx, 2
call fcn.00549c08
lea ecx, [ebp - 0xc]
push ecx
mov word [ebp - 0x128], 0x140
mov edx, 0x5b0ec4
lea eax, [ebp - 0xcc]
call fcn.005499e4
inc dword [ebp - 0x11c]
lea ecx, [ebp - 0xcc]
push ecx
lea eax, [ebp - 0xd0]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0xd0]
push edx
call fcn.0043d4ec
push eax
call fcn.0043f048
add esp, 0x10
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xd0]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xcc]
mov edx, 2
call fcn.00549c08
movzx ecx, word [ebp - 0x13a]
push ecx
mov word [ebp - 0x128], 0x14c
mov edx, 0x5b0ed0
lea eax, [ebp - 0xd4]
call fcn.005499e4
inc dword [ebp - 0x11c]
push dword [eax]
lea eax, [ebp - 0xd8]
call fcn.00401fbc
push eax
inc dword [ebp - 0x11c]
call fcn.0043d4f8
pop ecx
lea edx, [ebp - 0xd8]
push dword [edx]
call fcn.0043d4ec
push eax
call fcn.0043ff50
add esp, 0x10
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xd8]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xd4]
mov edx, 2
call fcn.00549c08
mov word [ebp - 0x128], 0x158
lea edx, [ebp - 0x24c]
lea eax, [ebp - 0xdc]
call fcn.005499e4
mov edx, eax
inc dword [ebp - 0x11c]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xf4]
add eax, 0x5c
call fcn.00549c38
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xdc]
mov edx, 2
call fcn.00549c08
lea edx, [ebp - 8]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xf4]
add eax, 0x60
call fcn.00549c38
lea edx, [ebp - 0xc]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xf4]
add eax, 0x64
call fcn.00549c38
mov byte [ebp - 0x145], 1
jmp 0x40df76
cmp byte [ebp - 0x145], 0
je 0x40df88
push dword [ebp + 8]
call fcn.0040e570
pop ecx
mov al, byte [ebp - 0x145]
push eax
dec dword [ebp - 0x11c]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00549c08
dec dword [ebp - 0x11c]
lea eax, [ebp - 8]
mov edx, 2
call fcn.00549c08
pop eax
mov edx, dword [ebp - 0x138]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret