Function at 0x496d7c
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [esp + 0x60]
test esi, esi
je 0x497059
mov dword [esp], 0
call sub.msvcrt.dll_time
mov edi, eax
mov eax, dword [esp + 0x70]
add eax, dword [esp + 0x68]
mov dword [esp + 0x28], eax
add eax, 0x29
mov dword [esp + 0x2c], eax
mov ebp, dword [esi + 0x48]
mov eax, dword [esi + 0x68]
test eax, eax
jne 0x496ef4
cmp dword [esp + 0x28], 0x100
ja 0x496f48
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x198], eax
mov dword [esi + 0x1a0], 0
mov byte [esi + 0x6c], 0x62
lea eax, [esi + 0x6d]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x30]
mov dword [esp + 4], eax
lea ebx, [esp + 0x34]
mov dword [esp], ebx
call fcn.004a00f4
mov dword [esp + 8], 7
mov dword [esp + 4], str.pty_req
mov dword [esp], ebx
call fcn.004a0120
mov eax, dword [esp + 0x34]
mov byte [eax], 1
inc eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004a0120
mov eax, dword [esp + 0x74]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004a00f4
mov eax, dword [esp + 0x78]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004a00f4
mov eax, dword [esp + 0x7c]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004a00f4
mov eax, dword [esp + 0x80]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004a00f4
mov eax, dword [esp + 0x70]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004a0120
mov dword [esi + 0x68], 2
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov eax, dword [esi + 0x198]
mov dword [esp + 8], eax
lea eax, [esi + 0x6c]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004a0c2c
cmp eax, 0xffffffdb
je 0x49703c
test eax, eax
jne 0x49700c
mov eax, dword [esi + 0x1c]
mov dword [esp + 4], eax
lea ebx, [esi + 0x19c]
mov dword [esp], ebx
call fcn.004a00d0
mov dword [esi + 0x68], 3
jmp 0x496f6a
cmp eax, 2
je 0x496e9c
cmp eax, 3
je 0x496f64
mov dword [esp + 8], str.Unable_to_complete_request_for_channel_request_pty
mov dword [esp + 4], 0xffffffea
mov dword [esp], ebp
call fcn.0049ffcc
cmp eax, 0xffffffdb
jne 0x496f3d
mov eax, dword [esi + 0x48]
mov ebx, dword [eax + 0x50]
test ebx, ebx
je 0x49702c
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.004906d8
test eax, eax
je 0x496db0
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], str.term__mode_lengths_too_large
mov dword [esp + 4], 0xffffffde
mov dword [esp], ebp
call fcn.0049ffcc
jmp 0x496f16
lea ebx, [esi + 0x19c]
lea eax, [esi + 0x1a0]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 4
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], 1
lea eax, [esp + 0x3c]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x38]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x5e21f1
mov dword [esp], ebp
call fcn.004a26e0
cmp eax, 0xffffffdb
je 0x496f1b
test eax, eax
je 0x496fdc
mov dword [esi + 0x68], 0
mov dword [esp + 8], str.Failed_to_require_the_PTY_package
mov dword [esp + 4], 0xfffffff2
mov dword [esp], ebp
call fcn.0049ffcc
jmp 0x496f16
mov ecx, dword [esp + 0x38]
mov bl, byte [ecx]
mov dword [esp + 4], ebp
mov dword [esp], ecx
mov dword [esp + 0x24], eax
call dword [ebp + 0xc]
mov dword [esi + 0x68], 0
cmp bl, 0x63
mov eax, dword [esp + 0x24]
jne 0x496efe
jmp 0x496f3d
mov dword [esi + 0x68], 0
mov dword [esp + 8], str.Unable_to_send_pty_request_packet
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.0049ffcc
jmp 0x496f16
mov eax, 0xffffffdb
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], str.Would_block_sending_pty_request
mov dword [esp + 4], 0xffffffdb
mov dword [esp], ebp
call fcn.0049ffcc
jmp 0x496f1b
mov eax, 0xffffffd9
jmp 0x496f3d