Function at 0x40dc80
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x228
push ebx
push ebp
push esi
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x139]
mov byte [esp + 0x138], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x39]
mov byte [esp + 0x38], 0
rep stosd dword es:[edi], eax
xor esi, esi
push 0xf003f
stosw word es:[edi], ax
push esi
push esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], esi
stosb byte es:[edi], al
call dword [0x431104]
mov edi, eax
cmp edi, esi
mov dword [esp + 0x1c], edi
jne 0x40dce6
push str.OpenSCManager_Error_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x10000
push 0x40
call esi
mov ebx, eax
lea eax, [esp + 0x30]
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
push 0x10000
push ebx
push 3
push 0x30
push edi
call dword [0x431084]
push 0x104
push 0x40
call esi
mov ebp, eax
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], ebp
mov dword [esp + 0x24], 0
mov byte [ebp], 0x7f
mov eax, dword [esp + 0x20]
test eax, eax
jbe 0x40dfdc
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x40dd58
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, dword [esp + 0x1c]
mov eax, dword [ebx]
push 0xf01ff
push eax
push edi
mov dword [esp + 0x40], 0
call dword [0x431108]
mov edi, eax
push 0x1000
push 0x40
mov dword [esp + 0x34], edi
call esi
lea ecx, [esp + 0x34]
mov esi, eax
push ecx
push 0x1000
push esi
push edi
mov dword [esp + 0x28], esi
call dword [0x431088]
mov eax, dword [ebx + 0xc]
mov ecx, 0x40
cmp eax, 1
je 0x40ddbd
xor eax, eax
lea edi, [esp + 0x138]
lea edx, [esp + 0x138]
push 0x42c4ec
rep stosd dword es:[edi], eax
push edx
jmp 0x40ddd5
xor eax, eax
lea edi, [esp + 0x138]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x138]
push 0x42c4e4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [esi + 4], 2
jne 0x40ddfe
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x38]
push 0x42c4dc
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [esi + 4], 3
jne 0x40de21
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x38]
lea edx, [esp + 0x38]
push 0x42c4d4
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [esi + 4], 4
jne 0x40de44
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x38]
push 0x42c4cc
rep stosd dword es:[edi], eax
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ecx, dword [ebx + 4]
push ecx
call ebp
mov edx, dword [esi + 0xc]
mov edi, eax
push edx
call ebp
add edi, eax
lea eax, [esp + 0x38]
push eax
call ebp
lea ecx, [esp + 0x138]
add edi, eax
push ecx
call ebp
mov edx, dword [ebx]
add edi, eax
push edx
call ebp
mov ecx, dword [esp + 0x10]
lea eax, [edi + eax + 6]
mov edi, dword [esp + 0x14]
push edi
lea esi, [ecx + eax]
call dword [sym.imp.KERNEL32.dll_LocalSize]
cmp eax, esi
jae 0x40de96
push 0x42
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
mov dword [esp + 0x14], eax
mov edx, dword [ebx + 4]
push edx
call ebp
mov edx, dword [esp + 0x14]
mov esi, dword [ebx + 4]
mov ecx, eax
mov eax, dword [esp + 0x10]
inc ecx
lea edi, [eax + edx]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
push ecx
call ebp
mov edx, dword [esp + 0x10]
lea edi, [edx + eax + 1]
mov eax, dword [ebx]
push eax
mov dword [esp + 0x14], edi
call ebp
mov edx, dword [esp + 0x14]
mov esi, dword [ebx]
mov ecx, eax
add edi, edx
inc ecx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
push ecx
call ebp
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
lea edi, [edx + eax + 1]
mov eax, dword [esi + 0xc]
push eax
mov dword [esp + 0x14], edi
call ebp
mov edx, dword [esp + 0x14]
mov esi, dword [esi + 0xc]
mov ecx, eax
add edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 0xc]
push edx
call ebp
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x138]
push edx
lea edi, [ecx + eax + 1]
mov dword [esp + 0x14], edi
call ebp
mov ecx, eax
mov eax, dword [esp + 0x14]
inc ecx
lea esi, [esp + 0x138]
mov edx, ecx
add edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x138]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
mov ecx, dword [esp + 0x10]
lea edi, [ecx + eax + 1]
mov dword [esp + 0x10], edi
lea edx, [esp + 0x38]
push edx
call ebp
mov ecx, eax
mov eax, dword [esp + 0x14]
inc ecx
lea esi, [esp + 0x38]
mov edx, ecx
add edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x38]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
mov ecx, dword [esp + 0x10]
lea edx, [ecx + eax + 1]
mov eax, dword [esp + 0x2c]
push eax
mov dword [esp + 0x14], edx
call dword [0x431118]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
inc eax
add ebx, 0x24
cmp eax, ecx
mov dword [esp + 0x24], eax
jb 0x40dd4e
mov edi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x14]
push edi
call dword [0x431118]
mov edx, dword [esp + 0x10]
push 0x42
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x228
ret