Function at 0x401800
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40e74c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xce8
mov eax, dword [0x412850]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
mov dword [esp + 0xce8], eax
push edi
mov dword [esp + 0x24], esi
jne 0x401847
or eax, 0xffffffff
jmp 0x4023bd
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x1e0]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0xd8]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov eax, 0x412f00
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x38], ebx
mov byte [esp + 0xf], 0
mov dword [esp + 0x1c], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401886
sub eax, edx
mov dword [esp + 0x20], eax
je 0x4018f7
xor eax, eax
jmp 0x4018a0
mov cl, byte [eax + 0x412f00]
mov byte [esp + eax + 0x1e0], cl
inc eax
test cl, cl
jne 0x4018a0
mov eax, 0x413008
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4018c0
sub eax, edx
mov dword [esp + 0x20], eax
je 0x40199b
xor eax, eax
jmp 0x4018e0
mov cl, byte [eax + 0x413008]
mov byte [esp + eax + 0xd8], cl
inc eax
test cl, cl
jne 0x4018e0
jmp 0x40199b
mov ecx, dword [esi + 0x10]
push str.ExePath
call fcn.00402d50
test eax, eax
je 0x40199b
mov ecx, dword [esi + 0x10]
push ebx
push str.ExePath
call fcn.00402d50
mov ecx, eax
call fcn.004076d0
test eax, eax
je 0x40199b
mov ecx, dword [esi + 0x10]
push ebx
push str.ExePath
call fcn.00402d50
mov ecx, eax
call fcn.004076d0
lea edx, [esp + 0x1e0]
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x401941
mov ecx, dword [esi + 0x10]
push str.CopyExe
call fcn.00402d50
test eax, eax
je 0x40199b
mov ecx, dword [esi + 0x10]
push ebx
push str.CopyExe
call fcn.00402d50
mov ecx, eax
call fcn.004076d0
test eax, eax
je 0x40199b
mov ecx, dword [esi + 0x10]
push ebx
push str.CopyExe
call fcn.00402d50
mov ecx, eax
call fcn.004076d0
lea edx, [esp + 0xd8]
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x401991
mov ecx, dword [esi + 0x10]
push str.Service
call fcn.00402d50
test eax, eax
je 0x4019ec
mov ecx, dword [esi + 0x10]
push ebx
push str.Service
call fcn.00402d50
mov ecx, eax
call fcn.004076d0
test eax, eax
je 0x4019ec
mov ecx, dword [esi + 0x10]
push ebx
push str.Service
call fcn.00402d50
mov ecx, eax
call fcn.004076d0
lea edx, [esp + 0x78]
mov edi, edi
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x4019e0
jmp 0x401a0c
mov eax, dword [str.MSSQLServer]
mov ecx, dword [0x40f3fc]
mov edx, dword [0x40f400]
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edx
lea eax, [esp + 0x78]
mov dword [esp + 0x48], eax
mov al, byte [esi + 4]
test al, al
mov edi, 1
lea ecx, [esp + 0x1e0]
lea edx, [esp + 0xd8]
mov dword [esp + 0x4c], 0xf01ff
mov dword [esp + 0x50], 0x10
mov dword [esp + 0x54], 3
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], edx
je 0x401ad5
mov ecx, dword [esi + 0x10]
push str.Server
xor edi, edi
call fcn.00402d50
cmp eax, ebx
je 0x401a88
cmp dword [eax + 0x10], ebx
je 0x401a88
push ebx
mov ecx, eax
call fcn.004076d0
mov edi, eax
push 0x1dc
call fcn.00408079
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebx
mov dword [esp + 0xcfc], ebx
je 0x401ac2
push edi
lea ecx, [esp + 0x7c]
push ecx
mov ecx, eax
call fcn.00405880
mov dword [esp + 0xcfc], 0xffffffff
mov dword [esp + 0x10], eax
jmp 0x401b1c
xor eax, eax
mov dword [esp + 0xcfc], 0xffffffff
mov dword [esp + 0x10], eax
jmp 0x401b1c
push 0x2dc
call fcn.00408079
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebx
mov dword [esp + 0xcfc], edi
je 0x401b00
push ebx
lea edx, [esp + 0x7c]
push edx
mov ecx, eax
call fcn.00404fd0
jmp 0x401b02
xor eax, eax
mov edx, dword [eax]
lea ecx, [esp + 0x48]
push ecx
mov ecx, eax
mov dword [esp + 0xd00], 0xffffffff
mov dword [esp + 0x14], eax
call dword [edx]
mov edi, dword [esp + 0x24]
mov ecx, dword [edi + 0x10]
xor esi, esi
push esi
push str.Action
call fcn.00402d50
mov ecx, eax
call fcn.00407700
mov ecx, dword [edi + 0x10]
push str.ExePath
mov dword [esp + 0x24], eax
call fcn.00402d50
mov ecx, dword [edi + 0x10]
push str.SvcAccount
mov ebx, eax
call fcn.00402d50
mov ecx, dword [edi + 0x10]
push str.SvcPwd
mov dword [esp + 0x30], eax
call fcn.00402d50
mov ecx, dword [edi + 0x10]
push str.SvcEPwd
mov dword [esp + 0x48], eax
call fcn.00402d50
mov ecx, dword [edi + 0x10]
push str.SvcStartType
mov dword [esp + 0x44], eax
call fcn.00402d50
mov ecx, dword [edi + 0x10]
push str.Dependencies
mov dword [esp + 0x1c], eax
call fcn.00402d50
mov ecx, dword [edi + 0x10]
push str.Timeout
mov dword [esp + 0x34], eax
call fcn.00402d50
mov edx, dword [esp + 0x24]
mov ecx, dword [edx + 0x10]
push str.CopyExe
mov edi, eax
call fcn.00402d50
test edi, edi
je 0x401bd5
push esi
mov ecx, edi
call fcn.00407700
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x1cc], eax
mov edi, dword [esp + 0x20]
cmp edi, 5
je 0x401beb
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
call dword [edx + 4]
test eax, eax
je 0x401c1d
lea eax, [edi - 1]
cmp eax, 6
ja case.default.0x401bf7
jmp dword [eax*4 + 0x4023e0]
push 0x2b
call fcn.00401710
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
add esp, 4
push 1
call dword [eax + 0x1c]
mov esi, eax
test esi, esi
jne case.default.0x401bf7
call dword [0x40f12c]
mov dword [esp + 0x14], eax
jmp case.default.0x401bf7
push 0x2a
call fcn.00401710
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx + 0x10]
add esp, 4
push str.StartupOptions
call fcn.00402d50
test eax, eax
je 0x401d84
mov ebx, dword [esp + 0x24]
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0x4e8]
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 0x10]
push str.StartupOptions
call fcn.00402d50
mov eax, dword [eax + 0x10]
test eax, eax
mov dword [esp + 0x2c], eax
je 0x401d71
xor esi, esi
test eax, eax
mov dword [esp + 0x18], esi
jle 0x401d71
lea ecx, [ecx]
xor eax, eax
test esi, esi
mov ecx, 0x40
lea edi, [esp + 0x2e8]
rep stosd dword es:[edi], eax
jne 0x401ce8
mov ecx, dword [ebx + 0x10]
push esi
push str.StartupOptions
call fcn.00402d50
mov ecx, eax
call fcn.004076d0
lea edx, [esp + 0x2e8]
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x401cc0
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x2e9]
mov byte [esp + eax + 0x4e8], cl
inc eax
test cl, cl
jne 0x401cd0
jmp 0x401d60
lea edi, [esp + 0x4e8]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401cf0
mov dx, word [0x40f390]
mov ecx, dword [ebx + 0x10]
push esi
push str.StartupOptions
mov word [edi], dx
call fcn.00402d50
mov ecx, eax
call fcn.004076d0
lea edx, [esp + 0x2e8]
mov edi, edi
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x401d20
lea eax, [esp + 0x2e9]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401d33
lea edi, [esp + 0x4e8]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401d44
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
inc esi
cmp esi, eax
mov dword [esp + 0x18], esi
jl 0x401c90
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
lea edx, [esp + 0x4e8]
push edx
call dword [eax + 0x14]
jmp 0x401d97
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x18]
mov ebx, dword [esp + 0x2c]
add esp, 8
mov esi, eax
test esi, esi
jne 0x401da7
call dword [0x40f12c]
mov dword [esp + 0x14], eax
mov ecx, dword [ebx + 0x10]
push str.WaitForShutdown
call fcn.00402d50
test eax, eax
je case.default.0x401bf7
mov edx, dword [esp + 0x24]
mov ecx, dword [edx + 0x10]
push 0
push str.WaitForShutdown
call fcn.00402d50
mov ecx, eax
call fcn.00407700
test eax, eax
je case.default.0x401bf7
mov ecx, dword [esp + 0x10]
push 1
call fcn.00404d40
jmp case.default.0x401bf7
mov esi, dword [esp + 0x10]
mov ecx, esi
call fcn.00404fc0
test eax, eax
je 0x401e10
push 0x2b
call fcn.00401710
mov eax, dword [esi]
add esp, 4
push 1
mov ecx, esi
call dword [eax + 0x1c]
push 0x2a
call fcn.00401710
mov ecx, dword [esi]
push 0
push esi
call dword [ecx + 0x18]
add esp, 0xc
mov esi, eax
jmp case.default.0x401bf7
mov ecx, dword [esp + 0x10]
call fcn.00404fc0
mov esi, eax
test esi, esi
jne 0x401e55
push 0x426
mov esi, 1
mov dword [esp + 0x18], 0x426
call dword [0x40f130]
jmp case.default.0x401bf7
push 0x420
mov dword [esp + 0x18], 0x420
call dword [0x40f130]
jmp case.default.0x401bf7
push 0x2d
call fcn.00401710
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
add esp, 4
call dword [edx + 0xc]
jmp 0x401c13
push 0x2c
call fcn.00401710
mov ecx, dword [esp + 0x30]
xor ebx, ebx
add esp, 4
test ecx, ecx
mov dword [esp + 0x34], ebx
je 0x401ea7
push ebx
call fcn.004076d0
mov dword [esp + 0x6c], eax
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x401ebc
push 0
call fcn.004076d0
mov dword [esp + 0x70], eax
jmp 0x401f18
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x401f18
push 0
call fcn.004076d0
mov esi, eax
test esi, esi
je 0x401f18
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401ed4
sub eax, edx
inc eax
push eax
push 8
call dword [0x40f158]
push eax
call dword [0x40f15c]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x34], ebx
je 0x401f18
mov edx, ebx
mov eax, esi
sub edx, esi
mov edi, edi
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x401f00
push ebx
push esi
call fcn.00401060
add esp, 8
mov dword [esp + 0x70], ebx
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x401f3b
push 0
call fcn.00407700
cmp eax, 1
je 0x401f3b
xor ecx, ecx
cmp eax, 2
setne cl
add ecx, 2
mov eax, ecx
jmp 0x401f40
mov eax, 3
mov ecx, dword [esp + 0x30]
test ecx, ecx
mov dword [esp + 0x54], eax
je 0x401feb
push 0
call fcn.004076d0
test eax, eax
je 0x401feb
mov ecx, dword [esp + 0x30]
push 0
call fcn.004076d0
mov esi, eax
push esi
call fcn.00401010
add esp, 4
push 0x30
push eax
call dword [0x40f158]
push eax
call fcn.004079b0
push 0x40f2e8
push esi
mov dword [esp + 0x30], eax
call fcn.00407d40
mov ebx, dword [esp + 0x4c]
mov edi, eax
add esp, 0x14
test edi, edi
je 0x401fd0
cmp byte [edi], 0
je 0x401fd0
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + ebx*4]
mov ecx, edi
sub ecx, esi
push ecx
push esi
push eax
call fcn.00407f50
lea esi, [edi + 1]
push 0x40f2e8
push esi
inc ebx
call fcn.00407d40
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x401fa0
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + ebx*4]
mov al, byte [esi]
inc esi
mov byte [ecx], al
inc ecx
test al, al
jne 0x401fd7
mov edx, dword [edx]
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x68], edx
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
lea edx, [esp + 0x48]
push edx
call dword [eax]
mov esi, eax
test esi, esi
jne 0x402008
call dword [0x40f12c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
test eax, eax
mov edi, dword [0x40f160]
je 0x402022
push eax
push 8
call dword [0x40f158]
push eax
call edi
test ebx, ebx
je case.default.0x401bf7
push ebx
push 8
call dword [0x40f158]
push eax
call edi
jmp case.default.0x401bf7
push 0x2e
call fcn.00401710
xor edi, edi
add esp, 4
cmp ebx, edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x3c], edi
jne 0x40207e
cmp dword [esp + 0x2c], edi
jne 0x40208a
mov ecx, dword [esp + 0x44]
cmp ecx, edi
jne 0x402092
cmp dword [esp + 0x18], edi
jne 0x4020bf
cmp dword [esp + 0x30], edi
jne 0x4020bf
mov ecx, dword [esp + 0x40]
cmp ecx, edi
jne 0x4020c7
jmp 0x4023bb
push edi
mov ecx, ebx
call fcn.004076d0
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x44]
cmp ecx, edi
je 0x4020bf
push edi
call fcn.004076d0
cmp eax, edi
jne 0x4020a0
lea eax, [esp + 0xf]
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x2c]
cmp ecx, edi
je 0x402133
push edi
call fcn.004076d0
mov dword [esp + 0x3c], eax
jmp 0x402143
mov ecx, dword [esp + 0x40]
cmp ecx, edi
je 0x40209c
push edi
call fcn.004076d0
mov ebx, eax
cmp ebx, edi
jne 0x4020dd
lea ecx, [esp + 0xf]
mov dword [esp + 0x28], ecx
jmp 0x4020a4
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4020e2
sub eax, edx
inc eax
push eax
push 8
call dword [0x40f158]
push eax
call dword [0x40f15c]
mov esi, eax
cmp esi, edi
mov dword [esp + 0x34], esi
jne 0x402110
lea edx, [esp + 0xf]
mov dword [esp + 0x28], edx
jmp 0x4020a4
mov edx, esi
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x402116
push esi
push ebx
call fcn.00401060
add esp, 8
mov dword [esp + 0x28], esi
jmp 0x4020a4
cmp dword [esp + 0x44], edi
jne 0x402143
cmp dword [esp + 0x40], edi
jne 0x402143
mov dword [esp + 0x28], edi
mov ecx, dword [esp + 0x18]
cmp ecx, edi
je 0x402171
push edi
call fcn.00407700
cmp eax, 1
jne 0x402160
mov dword [esp + 0x18], 3
jmp 0x402179
xor ecx, ecx
cmp eax, 2
setne cl
add ecx, 2
mov dword [esp + 0x18], ecx
jmp 0x402179
mov dword [esp + 0x18], 0xffffffff
mov eax, dword [esp + 0x30]
cmp eax, edi
je 0x402222
push 0
mov ecx, eax
call fcn.004076d0
test eax, eax
je 0x402222
mov ecx, dword [esp + 0x30]
push 0
call fcn.004076d0
mov esi, eax
push esi
call fcn.00401010
add esp, 4
push 0x30
push eax
call dword [0x40f158]
push eax
call fcn.004079b0
push 0x40f2e8
push esi
mov dword [esp + 0x30], eax
call fcn.00407d40
mov ebx, dword [esp + 0x4c]
mov edi, eax
add esp, 0x14
test edi, edi
je 0x402207
cmp byte [edi], 0
je 0x402207
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + ebx*4]
mov ecx, edi
sub ecx, esi
push ecx
push esi
push eax
call fcn.00407f50
lea esi, [edi + 1]
push 0x40f2e8
push esi
inc ebx
call fcn.00407d40
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4021d7
mov edi, dword [esp + 0x1c]
mov ecx, dword [edi + ebx*4]
mov edi, edi
mov al, byte [esi]
inc esi
mov byte [ecx], al
inc ecx
test al, al
jne 0x402210
test edi, edi
je 0x402222
mov eax, dword [edi]
jmp 0x402228
mov edi, dword [esp + 0x1c]
xor eax, eax
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
push eax
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x30]
push 0xffffffffffffffff
push eax
mov eax, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x34]
push eax
call dword [edx + 0x10]
mov esi, eax
test esi, esi
jne 0x402258
call dword [0x40f12c]
mov dword [esp + 0x14], eax
test edi, edi
mov ebx, dword [0x40f160]
je 0x40226e
push edi
push 8
call dword [0x40f158]
push eax
call ebx
mov eax, dword [esp + 0x34]
test eax, eax
je case.default.0x401bf7
mov ecx, eax
push ecx
push 8
call dword [0x40f158]
push eax
call ebx
mov edi, dword [esp + 0x10]
test edi, edi
je 0x40229c
mov ecx, edi
call fcn.00404850
push edi
call fcn.00407dcb
add esp, 4
mov eax, dword [0x413130]
test eax, eax
je 0x4022ae
push eax
call fcn.00407ef4
add esp, 4
test esi, esi
jne 0x402388
mov eax, dword [0x413110]
push 0x200
lea edx, [esp + 0x2ec]
push edx
push 4
push eax
call dword [0x40f208]
lea ecx, [esp + 0x2e8]
push ecx
lea edx, [esp + 0x8ec]
push 0x40f37c
push edx
call dword [0x40f204]
mov ecx, dword [esp + 0x20]
add esp, 0xc
push esi
push esi
lea eax, [esp + 0x44]
push eax
push 0x400
push ecx
push esi
push 0x1100
call dword [0x40f134]
test eax, eax
je 0x40234f
mov ebx, dword [esp + 0x3c]
mov eax, ebx
mov edx, ebx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402318
lea edi, [esp + 0x8e8]
sub eax, edx
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402330
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
call dword [0x40f138]
lea edx, [esp + 0x8e8]
push 0x30
push edx
call fcn.00401180
mov eax, dword [esp + 0x2c]
mov cl, byte [eax + 0xc]
add esp, 8
test cl, cl
je 0x402382
mov eax, dword [0x413118]
test eax, eax
je 0x402382
push 0
push 0
push 0x10
push eax
call dword [0x40f220]
mov eax, dword [esp + 0x14]
jmp 0x4023bd
mov ecx, dword [esp + 0x24]
mov al, byte [ecx + 0xc]
test al, al
je 0x4023a9
mov eax, dword [0x413118]
test eax, eax
je 0x4023a9
push 0
push 0
push 0x10
push eax
call dword [0x40f220]
mov eax, dword [esp + 0x14]
cmp eax, 0x420
je 0x4023bd
cmp eax, 0x426
je 0x4023bd
xor eax, eax
mov ecx, dword [esp + 0xcf4]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0xcec]
call fcn.00407e0b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4