Function at 0x431a95
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
jne 0x431abb
cmp dword [ebp + 0xc], edi
jne 0x431abb
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xe
jmp 0x431da9
call fcn.00431f01
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x431ad8
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xb
jmp 0x431da9
cmp dword [ebp + 0x10], edi
jne 0x431af4
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0xc
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], 1
mov dword [ebp + 0x10], eax
push 0x44
lea eax, [ebp - 0x64]
pop esi
push esi
push edi
push eax
call sub.MSVCRT.dll_memset
push 0x10
lea eax, [ebp - 0x20]
push edi
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x1c]
add esp, 0x18
cmp eax, edi
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x64], esi
jne 0x431b29
test edi, edi
jne 0x431b29
test ebx, ebx
je 0x431b61
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x38], pe_nt_image_headers32
test eax, eax
jne 0x431b3e
push 0xfffffffffffffff6
call esi
test edi, edi
mov dword [ebp - 0x2c], eax
je 0x431b4a
mov dword [ebp - 0x28], edi
jmp 0x431b51
push 0xfffffffffffffff5
call esi
mov dword [ebp - 0x28], eax
test ebx, ebx
je 0x431b5a
mov dword [ebp - 0x24], ebx
jmp 0x431b61
push 0xfffffffffffffff4
call esi
mov dword [ebp - 0x24], eax
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x431b84
push 0
push esi
call sym.ruby187c.exc_dln_find_exe
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x431e93
mov dword [ebp + 0xc], esi
jmp 0x431e8b
or dword [ebp + 0x14], 0xffffffff
mov ebx, dword [ebp + 8]
mov al, byte [ebx]
cmp al, 0x80
jae 0x431bc7
mov ecx, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [ecx], 1
jle 0x431bac
movzx eax, al
push 8
push eax
call dword [sym.imp.MSVCRT.dll__isctype]
pop ecx
pop ecx
jmp 0x431bbd
mov ecx, dword [sym.imp.MSVCRT.dll__pctype]
movzx eax, al
mov ecx, dword [ecx]
mov al, byte [ecx + eax*2]
and eax, 8
test eax, eax
je 0x431bc7
inc ebx
mov dword [ebp + 8], ebx
jmp 0x431b8b
cmp byte [ebx], 0
mov esi, ebx
je 0x431c65
mov al, byte [esi]
cmp al, 0x80
jae 0x431c4d
mov ecx, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [ecx], 1
jle 0x431bf3
movzx eax, al
push 8
push eax
call dword [sym.imp.MSVCRT.dll__isctype]
pop ecx
pop ecx
jmp 0x431c04
mov ecx, dword [sym.imp.MSVCRT.dll__pctype]
movzx eax, al
mov ecx, dword [ecx]
mov al, byte [ecx + eax*2]
and eax, 8
test eax, eax
je 0x431c4d
mov edi, esi
sub edi, ebx
mov al, byte [esi + 1]
inc esi
cmp al, 0x80
jae 0x431c44
mov ecx, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [ecx], 1
jle 0x431c2f
movzx eax, al
push 8
push eax
call dword [sym.imp.MSVCRT.dll__isctype]
pop ecx
pop ecx
jmp 0x431c40
mov ecx, dword [sym.imp.MSVCRT.dll__pctype]
movzx eax, al
mov ecx, dword [ecx]
mov al, byte [ecx + eax*2]
and eax, 8
test eax, eax
jne 0x431c0c
mov al, byte [esi]
dec esi
test al, al
je 0x431c61
jmp 0x431c4f
xor edi, edi
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
cmp byte [esi], 0
jne 0x431bd2
test edi, edi
jne 0x431c6e
push ebx
call sub.MSVCRT.dll_strlen
pop ecx
mov edi, eax
push str.RUBYSHELL
call sym.ruby187c.exc_rb_w32_getenv
mov ebx, eax
pop ecx
test ebx, ebx
mov dword [ebp + 0xc], ebx
je 0x431cc2
push dword [ebp + 8]
call fcn.00432084
test eax, eax
pop ecx
mov dword [ebp + 0x14], eax
je 0x431cc2
push ebx
call sub.MSVCRT.dll_strlen
lea eax, [eax + edi + 7]
pop ecx
add eax, 3
and al, 0xfc
call fcn.00467750
mov esi, esp
push dword [ebp + 8]
push edi
push ebx
push str._s__c___.s_
push esi
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
jmp 0x431e59
push str.COMSPEC
call sym.ruby187c.exc_rb_w32_getenv
mov ebx, eax
pop ecx
test ebx, ebx
mov dword [ebp + 0xc], ebx
je 0x431db0
push ebx
call fcn.00431f21
mov esi, eax
mov eax, dword [ebp + 0x14]
neg esi
sbb esi, esi
pop ecx
inc esi
test eax, eax
jge 0x431cfa
push dword [ebp + 8]
call fcn.00432084
pop ecx
test eax, eax
jne 0x431d0f
push esi
push dword [ebp + 8]
call fcn.00431f61
pop ecx
test eax, eax
pop ecx
je 0x431db0
push ebx
call sub.MSVCRT.dll_strlen
pop ecx
mov edx, edi
mov ecx, esi
neg ecx
sbb ecx, ecx
add edx, eax
and ecx, 2
lea eax, [ecx + edx + 5]
add eax, 3
and al, 0xfc
call fcn.00467750
test esi, esi
mov ebx, esp
mov eax, 0x484e7c
jne 0x431d41
mov eax, str._s__c__.s
push dword [ebp + 8]
push edi
push dword [ebp + 0xc]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
mov dword [ebp + 8], ebx
call sym.ruby187c.exc_rb_w32_enter_critical
lea eax, [ebp - 0x20]
xor edi, edi
push eax
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebp + 0x10]
push edi
push edi
push 0x20
push dword [eax + 8]
push eax
push eax
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.ruby187c.exc_rb_w32_map_errno
pop ecx
mov ebx, eax
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], ebx
call sym.ruby187c.exc_rb_w32_leave_critical
cmp esi, edi
jne 0x431ece
mov eax, dword [ebp - 4]
mov dword [eax + 4], edi
xor eax, eax
jmp 0x431ef9
mov esi, dword [ebp + 8]
and dword [ebp + 0xc], 0
mov ebx, esi
cmp byte [ebx], 0
je 0x431e23
movsx eax, byte [esi]
push eax
push str..:____
call dword [sym.imp.MSVCRT.dll_strchr]
pop ecx
test eax, eax
pop ecx
jne 0x431e2f
mov al, byte [esi]
cmp al, 0x80
jae 0x431e09
mov ecx, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [ecx], 1
jle 0x431df4
movzx eax, al
push 8
push eax
call dword [sym.imp.MSVCRT.dll__isctype]
pop ecx
pop ecx
jmp 0x431e05
mov ecx, dword [sym.imp.MSVCRT.dll__pctype]
movzx eax, al
mov ecx, dword [ecx]
mov al, byte [ecx + eax*2]
and eax, 8
test eax, eax
jne 0x431e61
movsx eax, byte [esi]
push eax
push 0x484e64
call dword [sym.imp.MSVCRT.dll_strchr]
pop ecx
test eax, eax
pop ecx
jne 0x431e61
inc esi
cmp byte [esi], al
jne 0x431dbe
push 0
push ebx
call sym.ruby187c.exc_dln_find_exe
pop ecx
pop ecx
jmp 0x431e89
cmp byte [edi + ebx], 0
je 0x431d56
lea eax, [edi + 1]
add eax, 3
and al, 0xfc
call fcn.00467750
mov esi, esp
push edi
push dword [ebp + 8]
push esi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
and byte [esi + edi], 0
mov dword [ebp + 8], esi
jmp 0x431d56
sub esi, ebx
lea eax, [esi + 1]
add eax, 3
and al, 0xfc
call fcn.00467750
mov edi, esp
push esi
push ebx
push edi
call sub.MSVCRT.dll_memcpy
and byte [esi + edi], 0
push 0
push edi
call sym.ruby187c.exc_dln_find_exe
add esp, 0x14
mov edi, eax
test edi, edi
je 0x431d56
push edi
call sub.MSVCRT.dll_strlen
add eax, 4
pop ecx
and al, 0xfc
call fcn.00467750
mov esi, esp
push edi
push esi
call sub.MSVCRT.dll_strcpy
pop ecx
mov dword [ebp + 0xc], esi
pop ecx
mov al, byte [esi]
test al, al
je 0x431d56
cmp al, 0x2f
jne 0x431ec3
mov byte [esi], 0x5c
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
jmp 0x431eb2
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 4]
mov eax, dword [ebp - 0x20]
mov dword [esi], eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 4], eax
call sym.ruby187c.exc_rb_w32_osid
cmp eax, 2
je 0x431ef7
mov eax, dword [esi + 4]
neg eax
mov dword [esi + 4], eax
mov eax, esi
lea esp, [ebp - 0x70]
pop edi
pop esi
pop ebx
leave
ret