Function at 0x409e40
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x130
mov ecx, dword [0x416720]
mov eax, dword [0x41660c]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push edi
or ebx, 0xffffffff
push 2
push ebx
push 0x100c
push ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x4c], eax
call esi
mov edi, eax
xor ebp, ebp
cmp edi, ebp
jl 0x409ecf
mov eax, dword [0x416720]
lea edx, [esp + 0x14]
push edx
push ebp
push 0x1005
push eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x24], 4
mov dword [esp + 0x34], ebp
call esi
cmp ebx, ebp
jge 0x409ea6
mov ebx, edi
mov ecx, dword [0x41660c]
mov eax, dword [esp + 0x34]
cmp ecx, eax
jne 0x409eb8
mov dword [esp + 0x10], edi
mov edx, dword [0x416720]
push 2
push edi
push 0x100c
push edx
call esi
mov edi, eax
cmp edi, ebp
jge 0x409e79
cmp dword [esp + 0x10], ebp
jge 0x409f1f
cmp ebx, ebp
jge 0x409ee6
mov eax, dword [esp + 0x148]
mov dword [esp + 0x10], eax
jmp 0x409eea
mov dword [esp + 0x10], ebx
mov eax, dword [0x416720]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
mov dword [esp + 0x18], ecx
push edx
push ebp
push 0x1005
push eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x24], 4
mov dword [esp + 0x34], ebp
call esi
mov ecx, dword [esp + 0x34]
mov dword [0x41660c], ecx
mov eax, dword [0x415ec8]
xor edi, edi
cmp eax, ebp
jle 0x409f9b
mov ebx, 0x1000
mov eax, dword [0x416720]
lea edx, [esp + 0x14]
push edx
push ebp
push 0x1005
push eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x24], 2
mov dword [esp + 0x34], 0xf000
call esi
test byte [esp + 0x30], 1
je 0x409f91
mov ecx, dword [esp + 0x30]
mov edx, dword [0x416720]
dec ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], ecx
lea ecx, [esp + 0x14]
push ecx
push ebp
push 0x1006
push edx
call esi
mov eax, dword [0x416720]
push edi
push edi
push 0x1015
push eax
call esi
mov eax, dword [0x415ec8]
inc edi
cmp edi, eax
jl 0x409f2f
mov ecx, dword [0x416720]
push 2
push 0xffffffffffffffff
push 0x100c
push ecx
mov dword [0x412fc0], ebp
or ebx, 0xffffffff
call esi
mov edi, eax
cmp edi, ebp
jl 0x40a078
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], edi
cmp edi, eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], 0xf000
jne 0x409ff9
mov eax, dword [0x416720]
lea edx, [esp + 0x14]
push edx
push ebp
push 0x1005
push eax
mov dword [esp + 0x24], 0xe
call esi
mov ebx, dword [esp + 0x34]
jmp 0x40a015
mov edx, dword [0x416720]
lea ecx, [esp + 0x14]
push ecx
push ebp
push 0x1005
push edx
mov dword [esp + 0x24], 0xa
call esi
test byte [esp + 0x30], 1
jne 0x40a051
mov eax, dword [esp + 0x30]
mov ecx, dword [0x416720]
inc eax
mov dword [esp + 0x20], 0x2000
mov dword [esp + 0x30], eax
lea eax, [esp + 0x14]
push eax
push ebp
push 0x1006
push ecx
call esi
mov edx, dword [0x416720]
push edi
push edi
push 0x1015
push edx
call esi
mov edx, dword [0x412fc0]
mov eax, dword [0x416720]
push 2
push edi
inc edx
push 0x100c
push eax
mov dword [0x412fc0], edx
call esi
mov edi, eax
cmp edi, ebp
jge 0x409fc0
cmp ebx, ebp
jl 0x40a168
mov ecx, dword [0x412fc0]
mov eax, ebx
cmp ecx, 1
jne 0x40a0be
shl eax, 3
sub eax, ebx
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea esi, [eax + eax*2]
mov eax, dword [0x415ec0]
shl esi, 2
mov ecx, dword [eax + esi + 0xc]
mov edx, dword [eax + esi + 4]
push ecx
push edx
lea eax, [esp + 0x48]
push 0x413600
push eax
call edi
add esp, 0x10
jmp 0x40a0ef
shl eax, 3
sub eax, ebx
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea esi, [eax + eax*2]
mov eax, dword [0x415ec0]
shl esi, 2
dec ecx
mov edx, dword [eax + esi + 4]
push ecx
mov ecx, dword [eax + esi + 0xc]
lea eax, [esp + 0x44]
push ecx
push edx
push str._s_on__s___other__d_
push eax
call edi
add esp, 0x14
push ebp
lea ecx, [esp + 0x44]
push 1
push ecx
call fcn.0040c3c0
add esp, 0xc
push 0x413624
push 0xffffffffffffffff
push 0x413630
push 0x413638
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, dword [0x41660c]
cmp ecx, eax
je 0x40a16e
push ecx
lea edx, [esp + 0x44]
push 0x413640
push edx
call edi
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
add esp, 0xc
lea eax, [esp + 0x40]
push 0x413644
push eax
push str.SelDrv
push 0x413658
call edi
mov ecx, dword [0x415ec0]
push 0x413660
mov edx, dword [ecx + esi + 4]
push edx
push str.Driver
push 0x413674
call edi
mov ecx, dword [0x41660c]
mov edx, dword [esp + 0x3c]
cmp edx, ecx
je 0x40a1b2
mov esi, dword [0x415ec0]
mov eax, edx
shl eax, 3
sub eax, edx
lea eax, [eax + eax*2]
test byte [esi + eax*4 + 0x50], 1
je 0x40a1b2
mov esi, ecx
mov ecx, dword [esp + 0x144]
push ebp
push ebp
push 0x528
push ecx
mov dword [0x41660c], edx
call fcn.00405650
add esp, 0x10
mov dword [0x41660c], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x130
ret