Function at 0x401eb0
Capabilities:
Create thread
Read .ini file

Disassembly:
sub esp, 0x3f0
push esi
push 0x40d790
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esp + 4]
push 0x1f4
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea esi, [esp + eax + 4]
cmp eax, 4
mov byte [esi], 0
jbe 0x402276
cmp byte [esi - 4], 0x2e
jne 0x402276
lea ecx, [esp + 4]
push ecx
push 0x40a6cc
push 0x40d9a0
call fcn.004022e1
add esp, 0xc
lea edx, [esp + 4]
mov byte [esi - 4], 0
push edx
push str._s.ini
push 0x40d39c
call fcn.004022e1
add esp, 0xc
lea eax, [esp + 4]
push eax
push str._s.log
push 0x40db98
call fcn.004022e1
add esp, 0xc
lea ecx, [esp + 4]
push ecx
push str._s.log.bak
push 0x40d7a8
call fcn.004022e1
add esp, 0xc
push str.
call section..text
add esp, 4
push str.Sweda_Daemon_Service_Loader
call section..text
add esp, 4
push str.Version_1.0.1__2012_05_22_
call section..text
add esp, 4
push str.
call section..text
add esp, 4
push 0x40d9a0
push str.Running_App_:__s
call section..text
add esp, 8
push 0x40d39c
push str.Using_Config:__s
call section..text
add esp, 8
push 0x40db98
push str.Log_Filename:__s
call section..text
add esp, 8
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x40d39c
push 0x1f4
push 0x40d594
push str.SwedaService
push str.ServiceName
push str.Settings
call esi
push 0x40d594
push str.Service_Name:__s
call section..text
add esp, 8
lea edx, [esp + 0x1fc]
push 0x40d39c
push 0x1f4
push edx
push str.500000
push str.MaxLogSize
push str.Settings
call esi
lea eax, [esp + 0x1fc]
push eax
call fcn.0040236f
add esp, 4
cmp eax, 0x7a120
mov dword [0x40a030], eax
jge 0x402039
mov eax, 0x7a120
mov dword [0x40a030], eax
push edi
push eax
push str.Maximum_Log_:__ld
call section..text
add esp, 8
push str._____________________________________________________________________________
call section..text
mov edi, dword [esp + 0x400]
add esp, 4
cmp edi, 2
jne 0x402125
mov esi, dword [esp + 0x400]
mov ecx, dword [esi + 4]
push ecx
push 0x40a540
call fcn.004025c0
add esp, 8
test eax, eax
jne 0x4020a2
push 0x40d594
call fcn.00401bf0
add esp, 4
push 0x40d790
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
pop edi
pop esi
add esp, 0x3f0
ret
mov edx, dword [esi + 4]
push edx
push 0x40a53c
call fcn.004025c0
add esp, 8
test eax, eax
jne 0x4020dd
push 0x40d594
push 0x40d9a0
call fcn.00401ca0
add esp, 8
push 0x40d790
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
pop edi
pop esi
add esp, 0x3f0
ret
mov eax, dword [esi + 4]
push eax
push 0x40a538
call fcn.004025c0
add esp, 8
test eax, eax
jne 0x402217
push 0x40d594
call fcn.00401850
push 0
push 0
push 0x40d594
call fcn.00401920
add esp, 0x10
push 0x40d790
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
pop edi
pop esi
add esp, 0x3f0
ret
mov esi, dword [esp + 0x400]
cmp edi, 3
jne 0x4021bd
mov ecx, dword [esi + 4]
push ecx
push 0x40a538
call fcn.004025c0
add esp, 8
test eax, eax
jne 0x40217c
mov edx, dword [esi + 8]
push edx
call fcn.004023fa
mov esi, eax
push esi
push 0x40d594
call fcn.00401770
add esp, 0xc
test eax, eax
push esi
je 0x402172
push str.Bounced_process__d
jmp 0x40225a
push str.Failed_to_bounce_process__d
jmp 0x40225a
mov eax, dword [esi + 4]
push eax
push 0x40a504
call fcn.004025c0
add esp, 8
test eax, eax
jne 0x4021c2
mov ecx, dword [esi + 8]
push ecx
call fcn.00401850
add esp, 4
test eax, eax
je 0x4021af
mov edx, dword [esi + 8]
push edx
push str.Killed_service__s
jmp 0x40225a
mov eax, dword [esi + 8]
push eax
push str.Failed_to_kill_service__s
jmp 0x40225a
cmp edi, 3
jl 0x402217
mov ecx, dword [esi + 4]
push ecx
push 0x40a4d0
call fcn.004025c0
add esp, 8
test eax, eax
jne 0x402217
cmp edi, 3
jle 0x4021e1
lea ecx, [esi + 0xc]
jmp 0x4021e3
xor ecx, ecx
cmp edi, 3
jle 0x4021ed
lea eax, [edi - 3]
jmp 0x4021ef
xor eax, eax
mov edx, dword [esi + 8]
push ecx
push eax
push edx
call fcn.00401920
add esp, 0xc
test eax, eax
je 0x40220c
mov eax, dword [esi + 8]
push eax
push str.Ran_service__s
jmp 0x40225a
mov ecx, dword [esi + 8]
push ecx
push str.Failed_to_run_service__s
jmp 0x40225a
push 0
push 0
push 0x401d40
call fcn.00402446
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0xc
cmp eax, 0xffffffff
jne 0x402243
call esi
push eax
push str._beginthread_failed__error_code___d
call section..text
add esp, 8
push 0x40a038
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherA]
test eax, eax
jne 0x402262
call esi
push eax
push str.StartServiceCtrlDispatcher_failed__error_code___d
call section..text
add esp, 8
push 0x40d790
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
pop edi
pop esi
add esp, 0x3f0
ret
lea edx, [esp + 4]
push edx
push str.Invalid_module_file_name:__s_r_n
call fcn.00402405
add esp, 8
pop esi
add esp, 0x3f0
ret