Function at 0x405577
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc80
mov eax, dword [0x40202c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
push edi
mov dword [ebp - 0xc20], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0xc2c], eax
mov dword [ebp - 0xc10], esi
mov dword [ebp - 0xc18], esi
mov dword [ebp - 0xc1c], esi
mov dword [ebp - 0xc24], esi
mov dword [ebp - 0xc0c], esi
mov dword [ebp - 0xc14], esi
mov dword [ebp - 0xc08], esi
mov dword [ebp - 0xc28], 0x200
mov edi, 0x20019
cmp dword [ebp + 0x18], esi
je 0x4055ea
mov edi, 0x20119
test eax, eax
je 0x405a09
cmp word [eax], si
je 0x405a09
test ecx, ecx
je 0x405a09
cmp word [ecx], si
je 0x405a09
lea eax, [ebp - 0xc18]
push eax
push edi
push ecx
push 0x80000002
call fcn.004020f4
mov esi, eax
test esi, esi
js 0x405a0e
mov eax, dword [ebp - 0xc20]
test eax, eax
je 0x405735
xor ecx, ecx
cmp word [eax], cx
je 0x405735
lea eax, [ebp - 0xc1c]
push eax
push edi
push dword [0x409144]
push dword [ebp - 0xc18]
call fcn.004020f4
mov esi, eax
test esi, esi
js 0x405a0e
lea eax, [ebp - 0xc24]
push eax
push edi
push dword [ebp - 0xc20]
push dword [ebp - 0xc1c]
call fcn.004020f4
mov esi, eax
test esi, esi
js 0x405a0e
lea eax, [ebp - 0xc0c]
push eax
push edi
push dword [0x409148]
push dword [ebp - 0xc24]
call fcn.004020f4
mov esi, eax
test esi, esi
js 0x405a0e
lea eax, [ebp - 0xc08]
push eax
xor edi, edi
push edi
lea eax, [ebp - 0xc14]
push eax
push edi
push dword [ebp - 0xc0c]
call fcn.00404385
mov esi, eax
mov eax, 0x80070002
test esi, esi
jns 0x4056db
cmp esi, eax
jne 0x405a0e
cmp esi, eax
je 0x4056fe
test esi, esi
js 0x405737
cmp dword [ebp - 0xc14], 1
je 0x4056f5
cmp dword [ebp - 0xc14], 2
jne 0x4056fe
cmp dword [ebp - 0xc08], 2
ja 0x405737
lea eax, [ebp - 0xc08]
push eax
push edi
lea eax, [ebp - 0xc14]
push eax
push dword [0x40915c]
push dword [ebp - 0xc0c]
call fcn.00404385
mov esi, eax
test esi, esi
js 0x405a0e
cmp dword [ebp - 0xc08], edi
ja 0x405737
jmp 0x40598a
xor edi, edi
test ebx, ebx
je 0x405740
cmp word [ebx], di
jne 0x40578a
mov ebx, dword [ebp - 0xc2c]
push 3
push ebx
call dword [sym.imp.SHLWAPI.dll_UrlIsW]
test eax, eax
je 0x40578a
push 0x400
lea eax, [ebp - 0x404]
push edi
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
push edi
lea eax, [ebp - 0xc28]
push eax
lea eax, [ebp - 0x404]
push eax
push ebx
call dword [sym.imp.SHLWAPI.dll_PathCreateFromUrlW]
test eax, eax
js 0x405788
lea ebx, [ebp - 0x404]
mov esi, edi
cmp dword [ebp + 0x18], 0
je 0x405991
cmp dword [ebp - 0xc0c], 0
je 0x405912
mov eax, dword [ebp - 0xc08]
test eax, eax
je 0x405912
add eax, 2
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
mov dword [ebp - 0xc10], esi
test esi, esi
jne 0x4057d0
mov esi, 0x8007000e
jmp 0x405a0e
mov eax, dword [ebp - 0xc08]
add eax, 2
push eax
push edi
push esi
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0xc08]
push eax
push esi
lea eax, [ebp - 0xc14]
push eax
push edi
push dword [ebp - 0xc0c]
call fcn.00404385
mov esi, eax
test esi, esi
js 0x405a0e
mov eax, dword [ebp - 0xc10]
cmp word [eax], di
je 0x405912
push 0x401564
push eax
call dword [sym.imp.MSVCR100.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x405905
push 0x73
pop ecx
push ebx
push dword [ebp - 0xc10]
mov word [eax + 2], cx
lea eax, [ebp - 0xc04]
push 0x400
push eax
call dword [sym.imp.MSVCR100.dll_swprintf_s]
add esp, 0x10
cmp eax, 0xffffffff
je 0x40598a
push 0x44
pop edi
push edi
xor ebx, ebx
lea eax, [ebp - 0xc80]
push ebx
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
or dword [ebp - 0xc3c], 0xffffffff
or dword [ebp - 0xc38], 0xffffffff
xor eax, eax
inc eax
mov dword [ebp - 0xc54], eax
mov word [ebp - 0xc50], ax
lea eax, [ebp - 0xc3c]
push eax
lea eax, [ebp - 0xc80]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0xc04]
push eax
push ebx
mov dword [ebp - 0xc80], edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ebx, eax
test ebx, ebx
jne 0x4058d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4058d4
and esi, 0xffff
or esi, 0x80070000
cmp dword [ebp - 0xc3c], 0xffffffff
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4058eb
push dword [ebp - 0xc3c]
call edi
cmp dword [ebp - 0xc38], 0xffffffff
je 0x405a0e
push dword [ebp - 0xc38]
call edi
jmp 0x405a0e
mov edi, 0x400
cmp dword [ebp - 0xc08], edi
jb 0x40591c
mov esi, 0x8000ffff
jmp 0x405a0e
push dword [ebp - 0xc08]
lea eax, [ebp - 0xc04]
push dword [ebp - 0xc10]
push edi
push eax
call dword [sym.imp.MSVCR100.dll_wcsncpy_s]
add esp, 0x10
test eax, eax
jne 0x40598a
push 0x40156c
push edi
mov edi, dword [sym.imp.MSVCR100.dll_wcscat_s]
lea eax, [ebp - 0xc04]
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x40598a
push ebx
mov ebx, 0x400
lea eax, [ebp - 0xc04]
push ebx
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x40598a
push 0x401574
lea eax, [ebp - 0xc04]
push ebx
push eax
call edi
add esp, 0xc
test eax, eax
je 0x40585a
mov esi, 0x80004005
jmp 0x405a0e
push 0x3c
pop edi
push edi
xor ecx, ecx
push ecx
lea eax, [ebp - 0xc78]
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [ebp - 0xc20]
mov dword [ebp - 0xc6c], eax
xor eax, eax
inc eax
mov dword [ebp - 0xc5c], eax
mov eax, dword [ebp - 0xc18]
mov dword [ebp - 0xc4c], eax
add esp, 0xc
lea eax, [ebp - 0xc78]
push eax
mov dword [ebp - 0xc78], edi
mov dword [ebp - 0xc74], 0x103
mov dword [ebp - 0xc68], ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x405a0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x405a0e
and esi, 0xffff
or esi, 0x80070000
jmp 0x405a0e
mov esi, 0x80070057
xor eax, eax
push eax
call fcn.00403feb
push dword [ebp - 0xc10]
call fcn.00403feb
lea eax, [ebp - 0xc18]
push eax
call fcn.0040211d
lea eax, [ebp - 0xc1c]
push eax
call fcn.0040211d
lea eax, [ebp - 0xc24]
push eax
call fcn.0040211d
lea eax, [ebp - 0xc0c]
push eax
call fcn.0040211d
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406887
leave
ret 0x14