Function at 0x51ec77
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
mov eax, dword [0x8d5f40]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [0x9360d0]
mov dword [ebp - 0x21c], eax
mov eax, dword fs:[0x2c]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x92a6e0]
push edi
cmp eax, dword [ecx + 0xc]
jg 0x51ef64
push 0x104
lea eax, [ebp - 0x20c]
xor ebx, ebx
push eax
push 0xffffffffffffffff
push esi
push ebx
push 0xfde9
mov dword [ebp - 0x220], ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x51ece7
xor al, al
jmp 0x51ef55
push 0x92a6c8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
mov dword [ebp - 0x214], ebx
mov esi, 0x92a6e8
mov word [0x92a6e8], ax
mov edi, esi
mov dword [ebp - 0x218], 1
cmp dword [ebp + 0xc], eax
jle 0x51eecf
push 0x20
pop ecx
test ebx, ebx
je 0x51ed38
mov eax, edi
sub eax, esi
sar eax, 1
cmp eax, 0x1fff
jae 0x51ef3c
mov word [edi], cx
add edi, 2
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
mov eax, 0x2000
sub ecx, esi
sar ecx, 1
sub eax, ecx
mov dword [ebp - 0x22c], ecx
push eax
mov eax, dword [ebp - 0x21c]
push edi
push 0xffffffffffffffff
push dword [eax + ebx*4]
xor ebx, ebx
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x51ed81
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x51ef3c
movzx eax, word [edi]
mov dl, bl
mov byte [ebp - 0x20d], dl
mov ebx, edi
test ax, ax
je 0x51ee50
mov ecx, eax
push 0x20
pop eax
cmp cx, ax
je 0x51eea4
cmp cx, 9
je 0x51eea4
xor eax, eax
push 0x5c
pop esi
mov edx, eax
movzx eax, cx
cmp cx, si
jne 0x51edca
add ebx, 2
inc edx
movzx eax, word [ebx]
cmp ax, si
je 0x51edbe
push 0x22
pop ecx
cmp ax, cx
jne 0x51ee39
mov ecx, ebx
inc edx
mov dword [ebp - 0x228], edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x220]
jne 0x51edde
sub ecx, esi
mov eax, ebx
sub eax, 0x92a6e8
sar ecx, 1
sar eax, 1
mov esi, 0x2000
sub esi, eax
mov dword [ebp - 0x224], esi
lea eax, [ecx + edx]
cmp eax, esi
jae 0x51ef3c
mov eax, dword [ebp - 0x224]
lea esi, [ebx + edx*2]
push ecx
push ebx
sub eax, edx
push eax
push esi
call fcn.007302d3
push dword [ebp - 0x228]
push 0x5c
push ebx
call fcn.0040978f
add esp, 0x1c
mov ebx, esi
mov dl, byte [ebp - 0x20d]
add ebx, 2
movzx eax, word [ebx]
mov ecx, eax
test ax, ax
jne 0x51ed99
mov esi, edi
xor ebx, ebx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x51ee57
sub esi, ecx
sar esi, 1
test dl, dl
je 0x51eeae
mov ecx, 0x2000
lea eax, [esi + 2]
sub ecx, dword [ebp - 0x22c]
cmp eax, ecx
jae 0x51ef3c
push esi
lea eax, [ecx - 1]
push edi
push eax
lea eax, [edi + 2]
push eax
call fcn.007302d3
add esp, 0x10
push 0x22
pop eax
mov word [edi], ax
lea edi, [edi + esi*2]
mov word [edi + 2], ax
add edi, 4
jmp 0x51eeb1
mov dl, 1
mov byte [ebp - 0x20d], dl
jmp 0x51ee3f
lea edi, [edi + esi*2]
mov ebx, dword [ebp - 0x214]
mov esi, 0x92a6e8
inc ebx
push 0x20
mov dword [ebp - 0x214], ebx
pop ecx
cmp ebx, dword [ebp + 0xc]
jl 0x51ed1d
xor eax, eax
push 0x40
mov word [edi], ax
push eax
lea eax, [ebp - 0x27c]
mov dword [ebp - 0x280], 0x44
push eax
call fcn.00718210
xor eax, eax
lea edi, [ebp - 0x23c]
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x280]
push eax
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x51ef3c
push dword [ebp - 0x23c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x238]
call esi
jmp 0x51ef44
xor eax, eax
mov byte [ebp - 0x218], al
push 0x92a6c8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, byte [ebp - 0x218]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006fedff
leave
ret
mov edi, 0x92a6e0
push edi
call fcn.006ff6c2
cmp dword [0x92a6e0], 0xffffffff
pop ecx
jne 0x51ecb9
push 0x92a6c8
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x7b5d73
call fcn.006fedea
push edi
call fcn.006ff678
pop ecx
pop ecx
jmp 0x51ecb9