Function at 0x508730
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52de58
mov eax, dword fs:[0]
push eax
mov eax, 0x10c4
call fcn.0050fde0
mov eax, dword [0x573054]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x52ffc4
lea ecx, [ebp - 0x10b8]
call fcn.004032f0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x10b8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x1034]
push edx
call fcn.004b4b00
add esp, 0xc
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x10b8]
call fcn.004032a0
lea eax, [ebp - 0x1034]
push eax
call fcn.004b73f0
add esp, 4
movzx ecx, al
test ecx, ecx
jne 0x5087d9
mov byte [ebp - 0x1095], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1034]
call fcn.004032a0
mov al, byte [ebp - 0x1095]
jmp 0x508adb
push 0x1000
push 0
lea edx, [ebp - 0x1010]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1034]
call fcn.00405910
push eax
push 0x800
lea eax, [ebp - 0x1010]
push eax
push 0x52fbb0
push str.ServiceFlag
push str.ServiceRunInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
jne 0x508844
mov byte [ebp - 0x1096], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1034]
call fcn.004032a0
mov al, byte [ebp - 0x1096]
jmp 0x508adb
mov ecx, 2
imul edx, ecx, 0
movzx eax, word [ebp + edx - 0x1010]
test eax, eax
jne 0x50887c
mov byte [ebp - 0x1097], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1034]
call fcn.004032a0
mov al, byte [ebp - 0x1097]
jmp 0x508adb
lea ecx, [ebp - 0x1010]
push ecx
lea ecx, [ebp - 0x10d0]
call fcn.004032f0
mov byte [ebp - 4], 3
lea edx, [ebp - 0x10d0]
push edx
lea eax, [ebp - 0x1094]
push eax
call fcn.004b6850
add esp, 8
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x10d0]
call fcn.004032a0
lea ecx, [ebp - 0x1094]
push ecx
lea edx, [ebp - 0x1064]
push edx
call fcn.00461cd0
add esp, 8
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x104c]
call fcn.00408b80
mov byte [ebp - 4], 7
lea eax, [ebp - 0x104c]
push eax
lea ecx, [ebp - 0x1064]
call fcn.00405900
push eax
lea ecx, [ebp - 0x1064]
call fcn.004089f0
push eax
call fcn.005065c0
add esp, 0xc
movzx ecx, al
test ecx, ecx
je 0x508920
lea ecx, [ebp - 0x104c]
call fcn.004058f0
movzx edx, al
test edx, edx
je 0x508971
mov byte [ebp - 0x1098], 0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x104c]
call fcn.00405a70
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1064]
call fcn.00405a70
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1094]
call fcn.00405a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1034]
call fcn.004032a0
mov al, byte [ebp - 0x1098]
jmp 0x508adb
lea eax, [ebp - 0x104c]
push eax
lea ecx, [ebp - 0x107c]
push ecx
call fcn.004b67c0
add esp, 8
mov byte [ebp - 4], 8
push 0x52fbb4
lea edx, [ebp - 0x107c]
push edx
call fcn.004b4050
add esp, 8
push 0xc
lea ecx, [ebp - 0x101c]
call fcn.00403fa0
lea ecx, [ebp - 0x101c]
call fcn.004058d0
mov byte [ebp - 4], 9
lea eax, [ebp - 0x101c]
push eax
push 0x3b
lea ecx, [ebp - 0x107c]
push ecx
call fcn.004b5190
add esp, 0xc
mov dword [ebp - 0x10a0], 0
jmp 0x5089ee
mov edx, dword [ebp - 0x10a0]
add edx, 1
mov dword [ebp - 0x10a0], edx
lea ecx, [ebp - 0x101c]
call fcn.004064d0
cmp dword [ebp - 0x10a0], eax
jae 0x508a71
cmp dword [ebp - 0x10a0], 0
jne 0x508a37
mov eax, dword [ebp - 0x10a0]
push eax
lea ecx, [ebp - 0x101c]
call fcn.00418ef0
mov ecx, eax
call fcn.00405910
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi64]
add esp, 4
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov dword [ecx + 4], edx
jmp 0x508a6c
cmp dword [ebp - 0x10a0], 1
jne 0x508a6c
mov edx, dword [ebp - 0x10a0]
push edx
lea ecx, [ebp - 0x101c]
call fcn.00418ef0
mov ecx, eax
call fcn.00405910
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi64]
add esp, 4
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
jmp 0x5089df
mov byte [ebp - 0x1099], 1
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x101c]
call fcn.004058c0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x107c]
call fcn.004032a0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x104c]
call fcn.00405a70
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1064]
call fcn.00405a70
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1094]
call fcn.00405a70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1034]
call fcn.004032a0
mov al, byte [ebp - 0x1099]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050f48d
mov esp, ebp
pop ebp
ret