Function at 0x4d7690
Capabilities:
Get number of processors
Set environment variable

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x58]
push ebx
push esi
push edi
mov dword [ebp - 0xc], eax
mov byte [ebp - 4], dl
mov dword [ebp - 8], ecx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
xor eax, eax
push fcn.004d7640
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x10], 0
jne 0x4d770c
mov ecx, dword [ebp + 8]
mov dl, byte [ebp - 4]
mov eax, dword [ebp - 0xc]
call fcn.004d7ef0
jmp 0x4d7d88
mov al, byte [ebp - 4]
cmp al, 0x5d
jb 0x4d7d88
sub al, 0x5d
je 0x4d7758
sub al, 1
je 0x4d77a4
sub al, 1
je 0x4d7d88
sub al, 1
je 0x4d7cfc
sub al, 1
je 0x4d7d5c
sub al, 1
je 0x4d7848
sub al, 1
je 0x4d7d88
sub al, 1
je 0x4d7d74
jmp 0x4d7d88
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5c]
call fcn.0046f290
xor eax, eax
push fcn.004d7580
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.004b8f90
mov edx, dword [ebp - 0xc]
add dword [edx + 0x48], eax
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.004d7580
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x58]
call fcn.0046a2c0
jmp 0x4d7d88
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x60]
call fcn.0046f290
xor eax, eax
push fcn.004d7590
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.004b8f20
mov dword [ebp - 0x18], eax
push dword [ebp - 0x18]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x30]
call fcn.0047a6b0
mov edx, dword [ebp - 0x18]
mov eax, edx
sar eax, 0x1f
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebx + 0x40]
sub ecx, edx
mov edx, ecx
mov ecx, dword [ebx + 0x44]
sbb ecx, eax
mov eax, ecx
mov dword [ebx + 0x40], edx
mov dword [ebx + 0x44], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x44], 0
jl 0x4d781a
jg 0x4d7828
cmp dword [eax + 0x40], 0x4000
ja 0x4d7828
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx]
call dword [edx + 0x6c]
lea esi, [esi]
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.004d7590
jmp 0x4d7d88
mov eax, 0x5124b0
call fcn.0046a3a0
mov ebx, eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x40]
call fcn.004b90e0
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x3c]
mov eax, ebx
call fcn.0046a3f0
mov eax, dword [ebp - 0x3c]
lea edx, [ebp - 0x1c]
call fcn.00428b50
mov eax, dword [ebp + 8]
call fcn.004b8e20
mov byte [ebp - 0x24], al
mov byte [ebp - 0x28], 0x64
mov byte [ebp - 0x10], 0
xor eax, eax
push fcn.004d75c0
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x1c]
mov edx, 0x577bcc
call fcn.00408ab0
test eax, eax
jne 0x4d7951
mov edx, dword [ebp - 0x1c]
mov eax, ebp
call fcn.004d7dd0
mov eax, 0x5124b0
call fcn.0046a3e0
mov ebx, eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x40]
call fcn.004b90e0
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x44]
mov eax, ebx
mov esi, dword [ebx]
call dword [esi + 0x7c]
mov eax, dword [ebp - 0x44]
lea ecx, [ebp - 0x30]
xor dx, dx
call fcn.00409850
mov eax, 0x5124b0
call fcn.0046a3e0
mov ebx, eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x40]
call fcn.004b90e0
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x44]
mov eax, ebx
mov esi, dword [ebx]
call dword [esi + 0x7c]
mov eax, dword [ebp - 0x44]
lea ecx, [ebp - 0x34]
xor dx, dx
call fcn.00409850
mov eax, dword [ebp - 0x34]
test eax, eax
jne 0x4d792c
mov eax, 0x57d310
push eax
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x4d7939
mov eax, 0x57d310
push eax
call sub.kernel32.dll_SetEnvironmentVariableA
test eax, eax
je 0x4d7ce4
mov byte [ebp - 0x28], 0x63
nop
jmp 0x4d7ce4
mov eax, dword [ebp - 0x1c]
mov edx, str.pty_req
call fcn.00408ab0
test eax, eax
jne 0x4d79f2
mov edx, dword [ebp - 0x1c]
mov eax, ebp
call fcn.004d7dd0
mov eax, 0x5124b0
call fcn.0046a3a0
mov ebx, eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x40]
call fcn.004b90e0
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x3c]
mov eax, ebx
call fcn.0046a3f0
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
add eax, 0x1c
call fcn.00407f40
mov eax, dword [ebp + 8]
call fcn.004b8f20
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x64]
mov dword [edx + 0xc], eax
mov eax, dword [ebp + 8]
call fcn.004b8f20
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x64]
mov dword [edx + 0x10], eax
mov eax, dword [ebp + 8]
call fcn.004b8f20
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x64]
mov dword [edx + 0x18], eax
mov eax, dword [ebp + 8]
call fcn.004b8f20
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x64]
mov dword [edx + 0x14], eax
mov byte [ebp - 0x28], 0x63
jmp 0x4d7ce4
mov eax, dword [ebp - 0x1c]
mov edx, str.exit_status
call fcn.00408ab0
test eax, eax
jne 0x4d7a16
mov eax, dword [ebp + 8]
call fcn.004b8f20
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x68], eax
jmp 0x4d7ce4
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x1c]
mov ecx, 0xa
mov edx, 1
call fcn.00408d10
mov eax, dword [ebp - 0x3c]
mov edx, str.keepalive_
call fcn.00408ab0
test eax, eax
jne 0x4d7a46
mov byte [ebp - 0x28], 0x63
jmp 0x4d7ce4
mov eax, dword [ebp - 0x1c]
mov edx, str.simple_putty.projects.tartarus.org
call fcn.00408ab0
test eax, eax
jne 0x4d7a60
mov byte [ebp - 0x28], 0x63
jmp 0x4d7ce4
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x18], 2
jne 0x4d7ce4
lea eax, [ebp - 0x2c]
xor edx, edx
call fcn.00407f40
mov eax, dword [ebp - 0x1c]
mov edx, str.shell
call fcn.00408ab0
test eax, eax
jne 0x4d7aa1
mov edx, dword [ebp - 0x1c]
mov eax, ebp
call fcn.004d7dd0
lea eax, [ebp - 0x2c]
xor edx, edx
call fcn.00407f40
jmp 0x4d7c1f
mov eax, dword [ebp - 0x1c]
mov edx, str.exec
call fcn.00408ab0
test eax, eax
jne 0x4d7af3
mov edx, dword [ebp - 0x1c]
mov eax, ebp
call fcn.004d7dd0
mov eax, 0x5124b0
call fcn.0046a3e0
mov ebx, eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x40]
call fcn.004b90e0
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x44]
mov eax, ebx
mov esi, dword [ebx]
call dword [esi + 0x7c]
mov eax, dword [ebp - 0x44]
lea ecx, [ebp - 0x2c]
xor dx, dx
call fcn.00409850
jmp 0x4d7c1f
mov eax, dword [ebp - 0x1c]
mov edx, str.subsystem
call fcn.00408ab0
test eax, eax
jne 0x4d7be9
mov eax, 0x5124b0
call fcn.0046a3a0
mov ebx, eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x40]
call fcn.004b90e0
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x20]
mov eax, ebx
call fcn.0046a3f0
mov eax, dword [ebp - 0x20]
mov edx, str.sftp
call fcn.00408ab0
test eax, eax
je 0x4d7ba4
lea eax, [ebp - 0x3c]
call fcn.004031f0
push 0
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x58], eax
mov eax, 0x577ca4
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x50], eax
lea edx, [ebp - 0x58]
mov ecx, 2
lea eax, [ebp - 0x3c]
call fcn.004082d0
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], 0xb
lea eax, [ebp - 0x4c]
push eax
push 0
push 0x37
mov ecx, dword [str.Unsupported_session_type:__s]
mov edx, 1
mov eax, 0x532bcc
call fcn.0046fa60
mov edx, 0x4d7b3d
mov ecx, ebp
call fcn.00413470
lea esi, [esi]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov eax, dword [eax + 0x24]
mov eax, dword [eax + 0xa0]
test byte [eax + 0x38], 8
jne 0x4d7bdc
mov byte [ebp - 0x10], 1
mov cx, 0x3f
mov edx, 1
mov eax, 0x532bcc
call fcn.0046f9a0
mov edx, 0x4d7bbd
mov ecx, ebp
call fcn.00413470
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x1c]
call fcn.00407f40
jmp 0x4d7c1f
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x58], 0xb
lea eax, [ebp - 0x58]
push eax
push 0
push 0x37
mov ecx, dword [str.Unsupported_session_type:__s]
mov edx, 1
mov eax, 0x532bcc
call fcn.0046fa60
mov edx, 0x4d7be9
mov ecx, ebp
call fcn.00413470
xor eax, eax
push 0x4d7cdb
push ebp
push 0x413930
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x2c]
call fcn.0046f290
xor eax, eax
push fcn.004d75a0
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x28], 0
je 0x4d7cbc
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov eax, dword [eax + 0x24]
cmp dword [eax + 0xfc], 0
je 0x4d7c9a
push dword [ebp - 0x1c]
push dword [ebp - 0x2c]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov eax, dword [eax + 0x24]
mov eax, dword [eax + 0x100]
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0xc]
mov ebx, dword [ebx + 0x28]
mov ebx, dword [ebx + 0x24]
call dword [ebx + 0xfc]
jmp 0x4d7cb9
mov cx, 0x56
mov edx, 1
mov eax, 0x532bcc
call fcn.0046f9a0
mov edx, 0x4d7c9a
mov ecx, ebp
call fcn.00413470
lea esi, [esi]
xor edx, edx
pop eax
add esp, 0xc
mov dword fs:[edx], eax
mov eax, ebp
call fcn.004d75a0
mov byte [ebp - 0x28], 0x63
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
jmp 0x4d7ce4
xor edx, edx
pop eax
add esp, 0xc
mov dword fs:[edx], eax
mov eax, ebp
call fcn.004d75c0
jmp 0x4d7d88
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x18], 2
jne 0x4d7d4c
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x74], 0
je 0x4d7d1c
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x78]
mov edx, dword [ebp - 0xc]
call dword [edx + 0x74]
mov esi, esi
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x7c], 0
je 0x4d7d39
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x80]
lea edx, [ebp - 0x38]
mov ecx, dword [ebp - 0xc]
call dword [ecx + 0x7c]
jmp 0x4d7d40
mov dword [ebp - 0x38], 0
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0xc]
call fcn.004d7330
nop
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx]
call dword [edx + 0x68]
jmp 0x4d7d88
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx]
call dword [edx + 0x68]
mov eax, dword [ebp - 0xc]
call fcn.0046e090
jmp 0x4d7d88
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x18], 2
jne 0x4d7d88
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx]
call dword [edx + 0x68]
xor edx, edx
pop eax
add esp, 0xc
mov dword fs:[edx], eax
mov eax, ebp
call fcn.004d7640
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4