Function at 0x50cb10
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create thread
Resolve function by parsing pe exports
Resume thread

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x626170
push eax
mov dword fs:[0], esp
sub esp, 0xac
push ebx
push ebp
push esi
mov esi, dword [esp + 0xc8]
push edi
mov eax, dword [esi]
mov eax, dword [eax - 8]
test eax, eax
je 0x50d7dd
mov eax, dword [0x6e0ea0]
mov dword [esp + 0x20], eax
mov dword [esp + 0xc4], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x40]
push 7
push ecx
mov ecx, esi
mov byte [esp + 0xcc], 3
call fcn.004eb930
push str.WX_DDE
mov ecx, eax
mov byte [esp + 0xc8], 4
call fcn.004eb1b0
mov edx, dword [esp + 0x40]
mov edi, dword [sym.imp.MSVCRT.dll_free]
test eax, eax
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
sete bl
cmp ecx, 0xffffffff
mov byte [esp + 0xc4], 3
je 0x50cbbc
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50cbbc
push eax
call edi
add esp, 4
test bl, bl
mov ebx, dword [esp + 0xd0]
mov ebp, 1
je 0x50cd88
push 0x100
lea ecx, [esp + 0x18]
call fcn.004e9e10
push 0x100
lea ecx, [esp + 0x20]
call fcn.004e9e10
push 0x100
lea ecx, [esp + 0x1c]
call fcn.004e9e10
mov esi, dword [esi]
add esi, 0xe
mov ax, word [esi]
test ax, ax
je 0x50ccb8
cmp ax, 0x23
je 0x50cc2c
push eax
push ebp
lea ecx, [esp + 0x28]
add esi, 2
call fcn.004e9db0
mov ax, word [esi]
test ax, ax
jne 0x50cc0b
jmp 0x50ccb8
cmp word [esi], 0
je 0x50ccb8
mov ax, word [esi + 2]
add esi, 2
test ax, ax
je 0x50ccb8
cmp ax, 0x23
je 0x50cc60
push eax
push ebp
lea ecx, [esp + 0x1c]
add esi, 2
call fcn.004e9db0
mov ax, word [esi]
test ax, ax
jne 0x50cc42
jmp 0x50ccb8
cmp word [esi], 0
je 0x50ccb8
mov ax, word [esi + 2]
add esi, 2
test ax, ax
je 0x50ccb8
cmp ax, 0x23
je 0x50cc90
push eax
push ebp
lea ecx, [esp + 0x24]
add esi, 2
call fcn.004e9db0
mov ax, word [esi]
test ax, ax
jne 0x50cc72
jmp 0x50ccb8
cmp word [esi], 0
je 0x50ccb8
mov ax, word [esi + 2]
add esi, 2
test ax, ax
je 0x50ccb8
push eax
push ebp
lea ecx, [esp + 0x20]
add esi, 2
call fcn.004e9db0
mov ax, word [esi]
test ax, ax
jne 0x50cca2
test bl, 1
jne 0x50cd92
mov al, byte [0x6e314c]
mov byte [0x6e314c], 0
mov byte [esp + 0x13], al
mov byte [esp + 0x24], al
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
mov byte [esp + 0xd0], 5
call fcn.0050ca00
add esp, 0xc
test al, al
je 0x50cd7c
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x18]
mov byte [0x6e314c], al
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, 0xffffffff
je 0x50cd21
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50cd21
push eax
call edi
add esp, 4
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, 0xffffffff
je 0x50cd3d
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50cd3d
push eax
call edi
add esp, 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x50cd58
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50cd58
push eax
call edi
add esp, 4
mov ecx, dword [esp + 0x20]
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, 0xffffffff
je 0x50cd74
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50cd74
push eax
call edi
add esp, 4
or eax, 0xffffffff
jmp 0x50d7df
mov dl, byte [esp + 0x13]
mov byte [0x6e314c], dl
jmp 0x50cd92
push esi
lea ecx, [esp + 0x24]
call fcn.004ea610
or eax, 0xffffffff
xor esi, esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0xd4]
test eax, eax
mov byte [esp + 0xc4], 8
mov edi, 0xc
je 0x50ce86
mov cl, byte [eax + 0x3c]
test cl, cl
je 0x50ce86
lea eax, [esp + 0x44]
push esi
lea ecx, [esp + 0x40]
push eax
lea edx, [esp + 0x40]
mov dword [esp + 0x50], esi
mov esi, dword [sym.imp.KERNEL32.dll_CreatePipe]
push ecx
push edx
mov dword [esp + 0x54], edi
mov dword [esp + 0x5c], ebp
call esi
test eax, eax
push 0
je 0x50ce51
lea eax, [esp + 0x48]
lea ecx, [esp + 0x30]
push eax
lea edx, [esp + 0x30]
push ecx
push edx
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], ebp
call esi
test eax, eax
push 0
je 0x50ce51
lea eax, [esp + 0x48]
lea ecx, [esp + 0x38]
push eax
lea edx, [esp + 0x38]
push ecx
push edx
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], ebp
call esi
test eax, eax
jne 0x50ce84
push eax
push str.Failed_to_create_an_anonymous_pipe
call fcn.0042a0b0
push eax
call fcn.004f45b0
add esp, 0xc
call fcn.004f0590
test eax, eax
je 0x50cfb4
mov edx, dword [eax]
push 0
push str.Failed_to_redirect_the_child_process_IO
mov ecx, eax
call dword [edx + 8]
jmp 0x50cfb9
mov esi, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x78]
rep stosd dword es:[edi], eax
test esi, esi
mov dword [esp + 0x78], 0x44
je 0x50cf1a
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
mov dword [esp + 0xa4], 0x100
test bl, 2
mov dword [esp + 0xb0], ecx
mov dword [esp + 0xb4], edx
mov dword [esp + 0xb8], eax
jne 0x50ceeb
mov dword [esp + 0xa4], 0x101
mov word [esp + 0xa8], 0
mov edi, dword [esp + 0x3c]
push 2
push 0
lea ecx, [esp + 0x68]
push 0
push ecx
mov dword [esp + 0x4c], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push edi
call ebp
lea edx, [esp + 0x64]
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x78]
push edx
push eax
push 0
push 0
push 0x4000004
push esi
push 0
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
setne byte [esp + 0x13]
or edi, 0xffffffff
test esi, esi
je 0x50cf6e
mov eax, dword [esp + 0x38]
mov dword [esp + 0x38], edi
push eax
call ebp
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x2c], edi
push eax
call ebp
mov eax, dword [esp + 0x34]
mov dword [esp + 0x34], edi
push eax
call ebp
mov al, byte [esp + 0x13]
test al, al
jne 0x50d15c
test esi, esi
je 0x50cf94
mov eax, dword [esp + 0x28]
mov dword [esp + 0x28], edi
push eax
call ebp
mov eax, dword [esp + 0x30]
mov dword [esp + 0x30], edi
push eax
call ebp
call fcn.004f0590
test eax, eax
je 0x50d087
mov edx, dword [eax]
push 0
push str.Execution_of_command__s_failed
mov ecx, eax
call dword [edx + 8]
jmp 0x50d08c
mov eax, str.Failed_to_redirect_the_child_process_IO
push eax
call fcn.004f45b0
and bl, 1
add esp, 4
neg bl
lea ecx, [esp + 0x30]
mov byte [esp + 0xc4], 7
sbb ebx, ebx
call fcn.0050d830
lea ecx, [esp + 0x28]
mov byte [esp + 0xc4], 6
call fcn.0050d830
lea ecx, [esp + 0x38]
mov byte [esp + 0xc4], 3
call fcn.0050d830
mov eax, dword [esp + 0x18]
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x50d01f
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d01f
mov esi, dword [sym.imp.MSVCRT.dll_free]
push eax
call esi
add esp, 4
jmp 0x50d025
mov esi, dword [sym.imp.MSVCRT.dll_free]
mov ecx, dword [esp + 0x1c]
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, 0xffffffff
je 0x50d041
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d041
push eax
call esi
add esp, 4
mov edx, dword [esp + 0x14]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, 0xffffffff
je 0x50d05d
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d05d
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x20]
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x50d7d9
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d7d9
push eax
call esi
add esp, 4
mov eax, ebx
jmp 0x50d7df
mov eax, str.Execution_of_command__s_failed
mov ecx, dword [esp + 0x20]
push ecx
push eax
call fcn.004f45b0
and bl, 1
add esp, 8
neg bl
lea ecx, [esp + 0x30]
mov byte [esp + 0xc4], 7
sbb ebx, ebx
call fcn.0050d830
lea ecx, [esp + 0x28]
mov byte [esp + 0xc4], 6
call fcn.0050d830
lea ecx, [esp + 0x38]
mov byte [esp + 0xc4], 3
call fcn.0050d830
mov edx, dword [esp + 0x18]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, edi
je 0x50d0f7
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d0f7
mov esi, dword [sym.imp.MSVCRT.dll_free]
push eax
call esi
add esp, 4
jmp 0x50d0fd
mov esi, dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, edi
je 0x50d117
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d117
push eax
call esi
add esp, 4
mov ecx, dword [esp + 0x14]
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, edi
je 0x50d132
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d132
push eax
call esi
add esp, 4
mov edx, dword [esp + 0x20]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, edi
je 0x50d7d9
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d7d9
push eax
call esi
add esp, 4
mov eax, ebx
jmp 0x50d7df
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
cmp esi, edi
mov byte [esp + 0xc4], 0xa
je 0x50d249
push 0x1c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
mov byte [esp + 0xc4], 0xb
je 0x50d1ba
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x28], 0xffffffff
push ecx
mov ecx, eax
call fcn.0050c790
mov ebp, eax
jmp 0x50d1bc
xor ebp, ebp
push 0x1c
mov byte [esp + 0xc8], 0xa
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
mov byte [esp + 0xc4], 0xc
je 0x50d1f6
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x30], 0xffffffff
push ecx
mov ecx, eax
call fcn.0050c790
mov edi, eax
jmp 0x50d1f8
xor edi, edi
push 0x10
mov byte [esp + 0xc8], 0xa
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
mov byte [esp + 0xc4], 0xd
je 0x50d228
mov ecx, dword [esp + 0x60]
push ecx
mov ecx, eax
call fcn.0050c8c0
jmp 0x50d22a
xor eax, eax
mov ecx, dword [esp + 0xd4]
push edi
push eax
push ebp
mov byte [esp + 0xd0], 0xa
call fcn.0051be70
mov dword [esp + 0x54], ebp
mov dword [esp + 0x44], edi
mov edx, dword [0x6e503c]
push 0x50c720
push edx
push 0x728c7c
call fcn.0050e380
push 0x18
mov dword [esp + 0x60], eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x60]
add esp, 0x10
mov dword [esi + 4], eax
mov ecx, dword [esp + 0x6c]
mov al, bl
mov dword [esi + 8], ecx
and al, 1
mov dword [esi], edx
mov byte [esi + 0x14], al
mov eax, ebx
and eax, 1
mov dword [esp + 0x24], eax
je 0x50d29e
mov dword [esi + 0xc], 0
jmp 0x50d2a8
mov ecx, dword [esp + 0xd4]
mov dword [esi + 0xc], ecx
lea edx, [esp + 0x74]
push edx
push 0
push esi
push 0x50d860
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x50d39f
mov edx, dword [esp + 0x50]
push edx
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.005b6480
mov edi, dword [esp + 0x70]
add esp, 4
lea ecx, [esp + 0x30]
mov byte [esp + 0xc4], 7
call fcn.0050d830
lea ecx, [esp + 0x28]
mov byte [esp + 0xc4], 6
call fcn.0050d830
lea ecx, [esp + 0x38]
mov byte [esp + 0xc4], 3
call fcn.0050d830
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.MSVCRT.dll_free]
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, 0xffffffff
je 0x50d35c
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d35c
push eax
call esi
add esp, 4
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, 0xffffffff
je 0x50d378
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d378
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x50d393
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d393
push eax
call esi
add esp, 4
mov ecx, dword [esp + 0x20]
lea eax, [ecx - 0xc]
jmp 0x50d4b1
mov edx, dword [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x50d40e
mov ecx, dword [esp + 0x64]
push 0x2710
push ecx
call dword [sym.imp.USER32.dll_WaitForInputIdle]
test eax, eax
je 0x50d3d8
push str.Timeout_too_small_in_WaitForInputIdle
call fcn.0045dbf0
add esp, 4
jmp 0x50d3f7
lea edx, [esp + 0x18]
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.0050ca00
mov ebp, dword [esp + 0x60]
add esp, 0xc
test al, al
jne 0x50d40e
mov edx, dword [esp + 0xcc]
mov eax, dword [edx]
push eax
push str.Failed_to_send_DDE_request_to_the_process___s_.
call fcn.0045dbf0
add esp, 8
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x50d4cc
mov edi, dword [esp + 0x6c]
lea ecx, [esp + 0x30]
mov byte [esp + 0xc4], 7
call fcn.0050d830
lea ecx, [esp + 0x28]
mov byte [esp + 0xc4], 6
call fcn.0050d830
lea ecx, [esp + 0x38]
mov byte [esp + 0xc4], 3
call fcn.0050d830
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.MSVCRT.dll_free]
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x50d472
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d472
push eax
call esi
add esp, 4
mov ecx, dword [esp + 0x1c]
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, 0xffffffff
je 0x50d48e
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d48e
push eax
call esi
add esp, 4
mov edx, dword [esp + 0x14]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, 0xffffffff
je 0x50d4aa
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d4aa
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x20]
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x50d4c5
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d4c5
push eax
call esi
add esp, 4
mov eax, edi
jmp 0x50d7df
mov ecx, dword [0x7259a4]
test ecx, ecx
je 0x50d71b
call fcn.004f9750
test eax, eax
mov dword [esp + 0x50], eax
je 0x50d71b
and ebx, 8
mov dword [esp + 0x40], 0
mov dword [esp + 0x24], ebx
jne 0x50d507
mov ecx, eax
mov edx, dword [ecx]
call dword [edx + 0x34]
mov dword [esp + 0x40], eax
mov al, byte [esi + 0x14]
test al, al
je 0x50d5dd
test ebp, ebp
je 0x50d569
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x28]
test al, al
je 0x50d569
mov ebx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
lea ecx, [ebx + 0x1000]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
test eax, eax
jne 0x50d547
xor ebp, ebp
mov dword [esp + 0x54], ebp
jmp 0x50d569
mov edx, dword [ebp]
mov dword [esp + 0x58], eax
add eax, ebx
push 0x1000
push eax
mov ecx, ebp
call dword [edx + 0x20]
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x24]
add ebx, eax
mov dword [esp + 0x5c], ebx
test edi, edi
je 0x50d5bd
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x28]
test al, al
je 0x50d5bd
mov ebx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
lea ecx, [ebx + 0x1000]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
test eax, eax
jne 0x50d59d
xor edi, edi
mov dword [esp + 0x44], edi
jmp 0x50d5bd
mov edx, dword [edi]
mov dword [esp + 0x48], eax
add eax, ebx
push 0x1000
push eax
mov ecx, edi
call dword [edx + 0x20]
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x24]
add ebx, eax
mov dword [esp + 0x4c], ebx
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x50]
mov eax, dword [ecx]
call dword [eax + 0x38]
mov al, byte [esi + 0x14]
test al, al
jne 0x50d512
mov ebx, dword [esp + 0x24]
test ebx, ebx
jne 0x50d5ef
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x40]
push eax
mov edx, dword [ecx]
call dword [edx + 0x3c]
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
mov dword [esp + 0x28], ecx
call ebx
push esi
call fcn.005b6480
mov esi, dword [esp + 0x4c]
add esp, 4
test esi, esi
mov byte [esp + 0xc4], 9
je 0x50d636
mov eax, dword [esp + 0x4c]
mov ecx, edi
push eax
push esi
call fcn.005130f0
mov edi, dword [sym.imp.MSVCRT.dll_free]
push esi
call edi
add esp, 4
jmp 0x50d63c
mov edi, dword [sym.imp.MSVCRT.dll_free]
mov esi, dword [esp + 0x58]
mov byte [esp + 0xc4], 8
test esi, esi
je 0x50d65f
mov ecx, dword [esp + 0x5c]
push ecx
push esi
mov ecx, ebp
call fcn.005130f0
push esi
call edi
add esp, 4
xor esi, esi
mov eax, dword [esp + esi*4 + 0x30]
or ebp, 0xffffffff
cmp eax, ebp
je 0x50d673
push eax
call ebx
mov dword [esp + esi*4 + 0x30], ebp
inc esi
cmp esi, 2
jb 0x50d661
xor esi, esi
mov eax, dword [esp + esi*4 + 0x28]
cmp eax, ebp
je 0x50d68a
push eax
call ebx
mov dword [esp + esi*4 + 0x28], ebp
inc esi
cmp esi, 2
jb 0x50d67b
xor esi, esi
mov eax, dword [esp + esi*4 + 0x38]
cmp eax, ebp
je 0x50d6a1
push eax
call ebx
mov dword [esp + esi*4 + 0x38], ebp
inc esi
cmp esi, 2
jb 0x50d692
mov edx, dword [esp + 0x18]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, ebp
je 0x50d6c2
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d6c2
push eax
call edi
add esp, 4
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, ebp
je 0x50d6dc
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d6dc
push eax
call edi
add esp, 4
mov ecx, dword [esp + 0x14]
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, ebp
je 0x50d6f7
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d6f7
push eax
call edi
add esp, 4
mov edx, dword [esp + 0x20]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, ebp
je 0x50d712
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d712
push eax
call edi
add esp, 4
mov eax, dword [esp + 0x24]
jmp 0x50d7df
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov eax, dword [esp + esi*4 + 0x30]
or ebx, 0xffffffff
cmp eax, ebx
je 0x50d735
push eax
call edi
mov dword [esp + esi*4 + 0x30], ebx
inc esi
cmp esi, 2
jb 0x50d723
xor esi, esi
mov eax, dword [esp + esi*4 + 0x28]
cmp eax, ebx
je 0x50d74c
push eax
call edi
mov dword [esp + esi*4 + 0x28], ebx
inc esi
cmp esi, 2
jb 0x50d73d
xor esi, esi
mov eax, dword [esp + esi*4 + 0x38]
cmp eax, ebx
je 0x50d763
push eax
call edi
mov dword [esp + esi*4 + 0x38], ebx
inc esi
cmp esi, 2
jb 0x50d754
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.MSVCRT.dll_free]
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, ebx
je 0x50d789
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d789
push eax
call esi
add esp, 4
mov ecx, dword [esp + 0x1c]
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, ebx
je 0x50d7a4
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d7a4
push eax
call esi
add esp, 4
mov edx, dword [esp + 0x14]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, ebx
je 0x50d7bf
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d7bf
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x20]
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, ebx
je 0x50d7d9
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50d7d9
push eax
call esi
add esp, 4
mov eax, ebx
jmp 0x50d7df
xor eax, eax
mov ecx, dword [esp + 0xbc]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xb8
ret