Function at 0x51faf0
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create process suspended
Create two anonymous pipes
Delete file
Read file on windows
Write and execute a file
Write file on windows
Write pipe

Disassembly:
push ebp
xor eax, eax
mov ecx, 0x10
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x2bc]
mov esi, 1
push ebx
sub esp, 0x36c
mov ebx, dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [ebp - 0x2c0], 0x44
rep stosd dword es:[edi], eax
mov word [ebp - 0x290], si
lea esi, [ebp - 0x308]
mov dword [ebp - 0x294], 0x101
mov dword [ebp - 0x308], 0xc
mov dword [ebp - 0x304], 0
mov dword [ebp - 0x300], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.CONIN_
call ebx
sub esp, 0x1c
mov dword [ebp - 0x288], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.CONOUT_
call ebx
sub esp, 0x1c
cmp dword [ebp - 0x288], 0xffffffff
mov dword [ebp - 0x284], eax
je 0x520a20
cmp eax, 0xffffffff
je 0x520a20
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x637
xor eax, eax
mov dword [esp + 4], str.Opening_ConIn_n
cmp dword [ebp - 0x288], 0xffffffff
setne al
mov dword [esp], eax
call fcn.0050e8b0
mov eax, 0x638
call fcn.0050dc60
mov dword [esp + 4], str.Opening_ConOut_n
xor eax, eax
cmp dword [ebp - 0x284], 0xffffffff
setne al
mov dword [esp], eax
call fcn.0050e8b0
mov eax, dword [ebp - 0x284]
mov dword [ebp - 0x280], eax
mov eax, 0x63b
call fcn.0050dc60
lea eax, [ebp - 0x2ec]
mov edx, dword [sym.imp.kernel32.dll_GetConsoleScreenBufferInfo]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x284]
mov dword [esp], eax
mov dword [ebp - 0x340], edx
call edx
sub esp, 8
mov dword [esp], eax
mov dword [esp + 4], str.Getting_sb_info_n
call fcn.0050e8b0
call fcn.0057d110
mov ebx, dword [sym.imp.kernel32.dll_GetConsoleMode]
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x63c
lea eax, [ebp - 0x334]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x288]
mov dword [esp], eax
call ebx
sub esp, 8
mov dword [esp], eax
mov dword [esp + 4], str.Getting_console_in_mode_n
call fcn.0050e8b0
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x63d
lea eax, [ebp - 0x330]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x284]
mov dword [esp], eax
call ebx
sub esp, 8
mov dword [esp], eax
mov dword [esp + 4], str.Getting_console_out_mode_n
call fcn.0050e8b0
mov edi, dword [sym.imp.kernel32.dll_GetConsoleCP]
call edi
mov esi, dword [sym.imp.kernel32.dll_GetConsoleOutputCP]
mov dword [ebp - 0x338], eax
call esi
mov dword [ebp - 0x33c], eax
mov eax, 0x84fdc0
call fcn.0050d8f0
lea eax, [ebp - 0x237]
mov dword [esp + 0xc], 0x84fdc0
mov dword [esp + 8], 0x84fee0
mov dword [esp + 4], str.__s__process_dump___s__console
mov dword [esp], eax
call fcn.0050d7a0
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x643
lea eax, [ebp - 0x2fc]
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x2c0]
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x237]
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_CreateProcessA]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [ebp - 0x344], eax
call eax
sub esp, 0x28
mov dword [esp], eax
mov dword [esp + 4], 0x5ef99c
call fcn.0050e8b0
lea eax, [ebp - 0x2fc]
call fcn.0050e290
mov eax, dword [sym.imp.kernel32.dll_WritePrivateProfileStringA]
mov dword [esp + 0xc], 0x84fdc0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x348], eax
call eax
sub esp, 0x10
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x648
lea eax, [ebp - 0x2d6]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x284]
mov dword [esp], eax
mov edx, dword [ebp - 0x340]
call edx
sub esp, 8
mov dword [esp], eax
mov dword [esp + 4], str.Getting_sb_info_n
call fcn.0050e8b0
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x649
lea eax, [ebp - 0x32c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x288]
mov dword [esp], eax
call ebx
sub esp, 8
mov dword [esp], eax
mov dword [esp + 4], str.Getting_console_in_mode_n
call fcn.0050e8b0
mov eax, 0x64a
call fcn.0050dc60
lea eax, [ebp - 0x328]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x284]
mov dword [esp], eax
call ebx
sub esp, 8
mov dword [esp], eax
mov dword [esp + 4], str.Getting_console_out_mode_n
call fcn.0050e8b0
mov eax, dword [ebp - 0x334]
mov ebx, dword [sym.imp.kernel32.dll_SetConsoleMode]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x288]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x330]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x284]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x330]
mov edx, dword [ebp - 0x328]
sub esp, 8
and edx, 4
and eax, 0xfffffffb
or eax, edx
mov dword [ebp - 0x330], eax
call edi
mov ebx, dword fs:[0x18]
mov dword [ebp - 0x34c], eax
call esi
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [ebp - 0x350], eax
mov eax, 0x658
call fcn.0050dc60
mov dword [esp], 0
mov esi, dword [sym.imp.kernel32.dll_SetConsoleCP]
call esi
sub esp, 4
test eax, eax
sete al
mov dword [esp + 4], str.Shouldnt_succeed_n
movzx eax, al
mov dword [esp], eax
call fcn.0050e8b0
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x659
mov edx, dword [ebx + 0x34]
mov eax, 1
cmp edx, 0x57
je 0x51ff8e
mov ebx, dword [0x8f0770]
cmp edx, 0x78
sete cl
xor eax, eax
test ebx, ebx
sete al
and eax, ecx
mov dword [esp + 0xc], edx
mov dword [esp], eax
mov dword [esp + 8], 0x57
mov dword [esp + 4], str.GetLastError:_expecting__u_got__lu_n
mov edi, dword fs:[0x18]
call fcn.0050e8b0
mov eax, dword [edi + 0x34]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [ebp - 0x340], eax
call fcn.0057d110
mov ebx, dword [sym.imp.kernel32.dll_SetConsoleOutputCP]
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x662
mov dword [esp], 0
call ebx
sub esp, 4
test eax, eax
sete al
mov dword [esp + 4], str.Shouldnt_succeed_n
movzx eax, al
mov dword [esp], eax
call fcn.0050e8b0
mov eax, 0x663
call fcn.0050dc60
mov ecx, dword [edi + 0x34]
mov eax, 1
cmp ecx, 0x57
je 0x520029
mov edi, dword [0x8f0770]
cmp ecx, 0x78
sete dl
xor eax, eax
test edi, edi
sete al
and eax, edx
mov dword [esp + 0xc], ecx
mov dword [esp], eax
mov dword [esp + 8], 0x57
mov dword [esp + 4], str.GetLastError:_expecting__u_got__lu_n
call fcn.0050e8b0
mov eax, dword [ebp - 0x338]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x33c]
sub esp, 4
mov dword [esp], eax
call ebx
lea eax, [ebp - 0x27c]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
mov eax, dword [ebp - 0x2c0]
mov ecx, 0x5efae5
mov edx, str.StartupInfoA
sub esp, 4
mov dword [esp], eax
mov eax, 0x66d
call fcn.005104e0
mov ecx, str.lpDesktop
mov edx, str.StartupInfoA
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x274]
mov dword [esp], eax
mov eax, 0x66e
call fcn.00510420
mov edx, str.lpTitle
mov eax, str.StartupInfoA
call fcn.0050dfd0
mov ebx, eax
mov eax, 0x670
call fcn.0050dc60
mov edx, dword [0x8f0770]
test edx, edx
jne 0x5209c8
mov eax, 1
test ebx, ebx
jne 0x5209d8
mov dword [esp], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x84fee0
mov dword [esp + 4], str.expected__s_or_null__got__s_n
call fcn.0050e8b0
mov eax, dword [ebp - 0x2b0]
mov ecx, 0x5efb29
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x672
call fcn.005104e0
mov eax, dword [ebp - 0x2ac]
mov ecx, 0x5efb2d
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x673
call fcn.005104e0
mov eax, dword [ebp - 0x2a8]
mov ecx, str.dwXSize
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x674
call fcn.005104e0
mov eax, dword [ebp - 0x2a4]
mov ecx, str.dwYSize
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x675
call fcn.005104e0
mov eax, dword [ebp - 0x2a0]
mov ecx, str.dwXCountChars
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x676
call fcn.005104e0
mov eax, dword [ebp - 0x29c]
mov ecx, str.dwYCountChars
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x677
call fcn.005104e0
mov eax, dword [ebp - 0x298]
mov ecx, str.dwFillAttribute
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x678
call fcn.005104e0
mov eax, dword [ebp - 0x294]
mov ecx, str.dwFlags
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x679
call fcn.005104e0
mov ecx, str.wShowWindow
mov edx, str.StartupInfoA
movzx eax, word [ebp - 0x290]
mov dword [esp], eax
mov eax, 0x67a
call fcn.005104e0
mov eax, dword [ebp - 0x288]
mov ecx, str.hStdInput
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x67d
call fcn.005104e0
mov eax, dword [ebp - 0x284]
mov ecx, str.hStdOutput
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x67e
call fcn.005104e0
mov eax, dword [ebp - 0x280]
mov ecx, str.hStdError
mov edx, str.StartupInfoA
mov dword [esp], eax
mov eax, 0x67f
call fcn.005104e0
mov ecx, str.SizeX
mov edx, str.Console
movsx eax, word [ebp - 0x2ec]
mov dword [esp], eax
mov eax, 0x680
call fcn.005104e0
mov ecx, str.SizeY
mov edx, str.Console
movsx eax, word [ebp - 0x2ea]
mov dword [esp], eax
mov eax, 0x681
call fcn.005104e0
mov ecx, str.CursorX
mov edx, str.Console
movsx eax, word [ebp - 0x2e8]
mov dword [esp], eax
mov eax, 0x682
call fcn.005104e0
mov ecx, str.CursorY
mov edx, str.Console
movsx eax, word [ebp - 0x2e6]
mov dword [esp], eax
mov eax, 0x683
call fcn.005104e0
mov ecx, str.Attributes
mov edx, str.Console
movzx eax, word [ebp - 0x2e4]
mov dword [esp], eax
mov eax, 0x684
call fcn.005104e0
mov ecx, str.winLeft
mov edx, str.Console
movsx eax, word [ebp - 0x2e2]
mov dword [esp], eax
mov eax, 0x685
call fcn.005104e0
mov ecx, str.winTop
mov edx, str.Console
movsx eax, word [ebp - 0x2e0]
mov dword [esp], eax
mov eax, 0x686
call fcn.005104e0
mov ecx, str.winRight
mov edx, str.Console
movsx eax, word [ebp - 0x2de]
mov dword [esp], eax
mov eax, 0x687
call fcn.005104e0
mov ecx, str.winBottom
mov edx, str.Console
movsx eax, word [ebp - 0x2dc]
mov dword [esp], eax
mov eax, 0x688
call fcn.005104e0
mov ecx, str.maxWinWidth
mov edx, str.Console
movsx eax, word [ebp - 0x2da]
mov dword [esp], eax
mov eax, 0x689
call fcn.005104e0
mov ecx, str.maxWinHeight
mov edx, str.Console
movsx eax, word [ebp - 0x2d8]
mov dword [esp], eax
mov eax, 0x68a
call fcn.005104e0
mov edi, dword [ebp - 0x338]
mov ecx, str.InputCP
mov edx, str.Console
mov eax, 0x68b
mov dword [esp], edi
call fcn.005104e0
mov esi, dword [ebp - 0x33c]
mov ecx, str.OutputCP
mov edx, str.Console
mov eax, 0x68c
mov dword [esp], esi
call fcn.005104e0
mov eax, dword [ebp - 0x334]
mov ecx, str.InputMode
mov edx, str.Console
mov dword [esp], eax
mov eax, 0x68d
call fcn.005104e0
mov eax, dword [ebp - 0x330]
mov ecx, str.OutputMode
mov edx, str.Console
mov dword [esp], eax
mov eax, 0x68e
call fcn.005104e0
cmp dword [ebp - 0x340], 0x78
je 0x520a00
mov eax, 0x692
call fcn.0050dc60
mov dword [esp + 0xc], edi
mov eax, dword [ebp - 0x34c]
mov dword [esp + 4], str.Wrong_console_CP__expected_1252_got__ld__ld__n
cmp eax, 0x4e4
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0050e8b0
mov eax, 0x693
call fcn.0050dc60
mov dword [esp + 0xc], esi
mov eax, dword [ebp - 0x350]
mov dword [esp + 4], str.Wrong_console_SB_CP__expected_1252_got__ld__ld__n
cmp eax, 0x4e4
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0050e8b0
mov eax, 0x698
call fcn.0050dc60
mov dword [esp + 4], str.Wrong_console_mode_n
mov eax, dword [ebp - 0x334]
xor eax, 1
cmp eax, dword [ebp - 0x32c]
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0050e8b0
mov eax, 0x699
call fcn.0050dc60
mov dword [esp + 4], str.Wrong_console_SB_mode_n
mov eax, dword [ebp - 0x330]
xor eax, 1
cmp eax, dword [ebp - 0x328]
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0050e8b0
mov eax, dword [sym.imp.kernel32.dll_DeleteFileA]
mov dword [0x57f4a4], 0x80fda0
mov dword [esp], 0x84fdc0
mov dword [ebp - 0x338], eax
call eax
sub esp, 4
call fcn.0057d110
mov edi, dword [sym.imp.kernel32.dll_CreatePipe]
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x69e
lea eax, [ebp - 0x318]
mov dword [esp + 4], eax
lea eax, [ebp - 0x310]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call edi
sub esp, 0x10
mov dword [esp], eax
mov dword [esp + 4], str.Creating_parent_input_pipe_n
call fcn.0050e8b0
mov eax, 0x69f
call fcn.0050dc60
lea eax, [ebp - 0x314]
mov dword [esp + 0x18], 2
mov esi, dword [sym.imp.kernel32.dll_DuplicateHandle]
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xffffffff
mov eax, dword [ebp - 0x318]
mov dword [esp], 0xffffffff
mov dword [esp + 4], eax
call esi
sub esp, 0x1c
mov dword [esp], eax
mov dword [esp + 4], str.Duplicating_as_inheritable_child_output_pipe_n
call fcn.0050e8b0
mov eax, dword [ebp - 0x318]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], eax
call ebx
mov eax, 0x6a4
sub esp, 4
call fcn.0050dc60
lea eax, [ebp - 0x30c]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
lea eax, [ebp - 0x320]
mov dword [esp + 8], 0
mov dword [esp], eax
call edi
lea edi, [ebp - 0x2bc]
sub esp, 0x10
mov dword [esp], eax
mov dword [esp + 4], str.Creating_parent_output_pipe_n
call fcn.0050e8b0
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x6a5
lea eax, [ebp - 0x31c]
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xffffffff
mov eax, dword [ebp - 0x320]
mov dword [esp], 0xffffffff
mov dword [esp + 4], eax
call esi
xor esi, esi
sub esp, 0x1c
mov dword [esp], eax
mov dword [esp + 4], str.Duplicating_as_inheritable_child_input_pipe_n
call fcn.0050e8b0
mov eax, dword [ebp - 0x320]
mov dword [esp], eax
call ebx
mov eax, esi
mov ecx, 0xd
mov dword [ebp - 0x2c0], 0x44
rep stosd dword es:[edi], eax
mov eax, 1
sub esp, 4
lea edi, [ebp - 0x237]
mov word [ebp - 0x290], ax
mov eax, dword [ebp - 0x31c]
mov dword [ebp - 0x294], 0x101
mov dword [ebp - 0x288], eax
mov eax, dword [ebp - 0x314]
mov dword [ebp - 0x284], eax
mov dword [ebp - 0x280], eax
mov eax, 0x84fdc0
call fcn.0050d8f0
mov dword [esp], edi
lea edi, [ebp - 0x2fc]
mov dword [esp + 0xc], 0x84fdc0
mov dword [esp + 8], 0x84fee0
mov dword [esp + 4], str.__s__process_dump___s__stdhandle
call fcn.0050d7a0
mov eax, 0x6b4
call fcn.0050dc60
mov dword [esp + 0x24], edi
lea edi, [ebp - 0x2c0]
mov dword [esp + 0x20], edi
lea edi, [ebp - 0x237]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 8
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], 0
mov edi, dword [ebp - 0x344]
call edi
lea edi, [ebp - 0x234]
sub esp, 0x28
mov dword [esp], eax
mov dword [esp + 4], 0x5ef99c
call fcn.0050e8b0
mov eax, 0x6b5
call fcn.0050dc60
mov eax, dword [ebp - 0x31c]
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], str.Closing_handle_n
call fcn.0050e8b0
mov eax, 0x6b6
call fcn.0050dc60
mov eax, dword [ebp - 0x314]
mov dword [esp], eax
call ebx
lea ebx, [ebp - 0x324]
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], str.Closing_handle_n
call fcn.0050e8b0
mov eax, 0x6b9
call fcn.0050dc60
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x27
mov dword [esp + 4], str.This_is_a_std_handle_inheritance_test.
mov eax, dword [ebp - 0x30c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov dword [esp], eax
mov dword [esp + 4], str.Writing_to_child_n
call fcn.0050e8b0
mov eax, 0x6ba
call fcn.0050dc60
mov eax, dword [ebp - 0x324]
mov dword [esp + 8], 0x27
mov dword [esp + 4], str.Should_have_written__u_bytes__actually_wrote__lu_n
cmp eax, 0x27
mov dword [esp + 0xc], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0050e8b0
lea ecx, [ebp - 0x237]
mov eax, esi
mov dword [ebp - 0x237], 0
sub ecx, edi
mov dword [ebp - 0x10], 0
lea esi, [ebp - 0x237]
add ecx, 0x22b
shr ecx, 2
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x237]
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x6bc
mov dword [esp + 0xc], ebx
mov dword [esp + 4], esi
mov esi, dword [sym.imp.kernel32.dll_ReadFile]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x22b
mov eax, dword [ebp - 0x310]
mov dword [esp], eax
call esi
sub esp, 0x14
mov dword [esp], eax
mov dword [esp + 4], str.Reading_from_child_n
call fcn.0050e8b0
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x6bd
mov dword [esp], edi
mov dword [esp + 4], str.This_is_a_std_handle_inheritance_test.
call sub.msvcrt.dll_strcmp
mov dword [esp + 8], str.This_is_a_std_handle_inheritance_test.
test eax, eax
mov dword [esp + 4], str.Should_have_received__s_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0050e8b0
mov dword [esp + 0xc], ebx
mov dword [esp + 4], edi
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x22b
mov eax, dword [ebp - 0x310]
mov dword [esp], eax
call esi
lea esi, [ebp - 0x2fc]
sub esp, 0x14
mov eax, esi
call fcn.0050e290
mov dword [esp + 0xc], 0x84fdc0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
mov esi, dword [ebp - 0x348]
call esi
mov ecx, 0x5f2b39
mov edx, str.StdHandle
mov eax, 0x6c5
sub esp, 0x10
mov dword [esp + 4], 1
mov dword [esp], str.This_is_a_std_handle_inheritance_test.
call fcn.00510420
mov dword [0x57f4a4], 0x80fda0
mov dword [esp], 0x84fdc0
mov eax, dword [ebp - 0x338]
call eax
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
test ebx, ebx
je 0x5200eb
lea esi, [esi]
mov dword [esp + 4], 0x84fee0
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
sete al
movzx eax, al
jmp 0x5200eb
mov eax, 0x696
call fcn.0050dc60
mov dword [esp], str.Setting_the_codepage_is_not_implemented_n
call fcn.0050e770
jmp 0x520495
call dword [sym.imp.kernel32.dll_FreeConsole]
call dword [sym.imp.kernel32.dll_AllocConsole]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.CONIN_
call ebx
sub esp, 0x1c
mov dword [ebp - 0x288], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.CONOUT_
call ebx
mov dword [ebp - 0x284], eax
sub esp, 0x1c
jmp 0x51fbe7