Function at 0x7801c260
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x5c
mov eax, dword [esp + 0x60]
push ebx
push ebp
xor ebx, ebx
push esi
cmp eax, 4
push edi
mov byte [esp + 0x13], bl
ja case.default.0x7801c27a
jmp dword [eax*4 + 0x7801c4d4]
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x78]
mov dword [esp + 0x14], eax
mov cl, byte [eax]
test cl, cl
je 0x7801c2ad
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x7801c294
mov cl, byte [eax + 1]
test cl, cl
je 0x7801c2a7
mov byte [eax], 0x20
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x7801c294
mov esi, dword [0x78041820]
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
test esi, esi
mov dword [esp + 0x28], 0x44
je 0x7801c2f0
lea ecx, [esi - 1]
mov edx, ecx
mov eax, ecx
sar edx, 5
and eax, 0x1f
mov edx, dword [edx*4 + sym.MSVCRT.dll___pioinfo]
lea eax, [eax + eax*8]
cmp byte [edx + eax*4 + 4], 0
jne 0x7801c2f0
mov esi, ecx
test esi, esi
jne 0x7801c2cc
lea eax, [esi + esi*4 + 4]
push 1
mov word [esp + 0x5e], ax
mov ecx, dword [esp + 0x5e]
and ecx, 0xffff
push ecx
call sym.MSVCRT.dll_calloc
mov dword [esp + 0x64], eax
mov dword [eax], esi
mov edx, dword [esp + 0x64]
add esp, 8
xor ecx, ecx
test esi, esi
lea edi, [edx + 4]
lea ebp, [esi + edx + 4]
jle 0x7801c364
mov edx, ecx
mov eax, ecx
sar edx, 5
and eax, 0x1f
mov edx, dword [edx*4 + sym.MSVCRT.dll___pioinfo]
lea eax, [eax + eax*8]
lea eax, [edx + eax*4]
mov dl, byte [eax + 4]
test dl, 0x10
jne 0x7801c34d
mov byte [edi], dl
mov eax, dword [eax]
mov dword [ebp], eax
jmp 0x7801c357
mov byte [edi], 0
mov dword [ebp], 0xffffffff
inc ecx
inc edi
add ebp, 4
cmp ecx, esi
jl 0x7801c325
mov edx, dword [esp + 0x5c]
mov al, byte [esp + 0x13]
test al, al
je 0x7801c39a
xor edi, edi
lea eax, [edx + 4]
lea ecx, [esi + edx + 4]
cmp esi, 3
mov edx, esi
jl 0x7801c381
mov edx, 3
cmp edi, edx
jge 0x7801c395
mov byte [eax], 0
inc edi
mov dword [ecx], 0xffffffff
inc eax
add ecx, 4
jmp 0x7801c375
mov ebx, 8
call sym.MSVCRT.dll__errno
mov dword [eax], 0
call sym.MSVCRT.dll___doserrno
lea ecx, [esp + 0x18]
lea edx, [esp + 0x28]
mov dword [eax], 0
mov eax, dword [esp + 0x7c]
push ecx
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x7c]
push 0
push eax
push ebx
push 1
push 0
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esp + 0x5c]
push eax
call sym.MSVCRT.dll_free
add esp, 4
test esi, esi
jne 0x7801c407
push edi
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov eax, dword [esp + 0x70]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 2
jne 0x7801c433
push 0
call sym.MSVCRT.dll__exit
mov ecx, dword [esp + 0x20]
add esp, 4
push ecx
call esi
mov eax, dword [esp + 0x78]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
test eax, eax
jne 0x7801c46e
mov ecx, dword [esp + 0x18]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x78]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [esp + 0x18]
push ecx
call esi
mov ecx, dword [esp + 0x1c]
push ecx
call esi
mov eax, dword [esp + 0x78]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
cmp eax, 4
jne 0x7801c495
mov edx, dword [esp + 0x18]
push edx
call esi
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x78], 0
push ecx
call esi
mov eax, dword [esp + 0x78]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push ecx
mov dword [esp + 0x7c], eax
call esi
mov eax, dword [esp + 0x78]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
call sym.MSVCRT.dll__errno
mov dword [eax], 0x16
call sym.MSVCRT.dll___doserrno
pop edi
pop esi
mov dword [eax], 0
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x5c
ret