Function at 0x580140
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cefbb
mov eax, dword fs:[0]
push eax
sub esp, 0x8b8
mov eax, dword [0x692c00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x1c]
mov dword [ebp - 0x24], edx
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x8c4], edx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x8ac], eax
mov edx, dword [edx + 4]
mov dword [ebp - 0x8c0], edx
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x8b8], edi
mov dword [edx], 0
cmp byte [esi + 0xc4], 0
je 0x580264
test eax, eax
je 0x580252
push 0x74
lea eax, [ebp - 0x9c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x9c]
call fcn.0042aaf0
push dword [ebp - 0x8ac]
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], 0
push 0x5d780c
call fcn.0042abf0
push 0x5d38b0
lea ecx, [ebp - 0x9c]
call fcn.0042ebb0
test al, al
jne 0x580223
push 0x5d38b0
lea ecx, [ebp - 0x9c]
call fcn.0042b030
lea ecx, [ebp - 0x9c]
call fcn.0042f610
push eax
push dword [ebp - 0x1c]
mov ecx, esi
push 0x657cf4
call fcn.00581a10
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], 0xffffffff
call fcn.0042ab40
jmp 0x580264
push 0x5d38b0
push ecx
push 0x657cf4
mov ecx, esi
call fcn.00581a10
call sub.KERNEL32.DLL_GetTickCount
inc dword [esi + 0x81c]
lea ecx, [esi + 0x8f4]
mov dword [esi + 0x810], eax
call fcn.00436dd0
cmp dword [esi + 0xe8c], 0
je 0x580321
cmp byte [esi + 0x8a0], 0
lea ecx, [esi + 0x8a4]
je 0x5802b6
push edi
lea eax, [esi + 0x8f4]
push eax
call fcn.00582cc0
mov byte [esi + 0x8a0], 0
lea ecx, [esi + 0x8a4]
mov eax, dword [esi + 0x99c]
mov byte [ebp - 0x1c], 0
test eax, eax
je 0x5802cf
dec eax
mov byte [ebp - 0x1c], 1
mov dword [esi + 0x99c], eax
push 0
push edi
lea eax, [esi + 0x8f4]
push eax
push dword [ebp - 0x1c]
push ebx
call fcn.00582bb0
mov ecx, ebx
call fcn.00402fb0
cmp byte [ebp - 0x1c], 0
mov ebx, eax
jne 0x580316
cmp ebx, 0x40
jbe 0x580316
lea ecx, [esi + 0x8f4]
call fcn.00402fb0
mov ecx, ebx
shr ecx, 3
add eax, ecx
cmp eax, ebx
jbe 0x580316
mov dword [esi + 0x99c], 0x10
lea eax, [esi + 0x8f4]
mov ebx, eax
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0xeb4]
mov dword [ebp - 0x8ac], 8
cmp eax, 1
je 0x580363
cmp eax, 2
je 0x580363
cmp eax, 0xc
je 0x580363
cmp eax, 0xe
je 0x580363
cmp eax, 0xf
je 0x580363
cmp eax, 9
je 0x580363
cmp eax, 0xa
je 0x580363
cmp eax, 0xb
je 0x580363
cmp eax, 3
je 0x580363
cmp eax, 4
jne 0x58036d
mov dword [ebp - 0x8ac], 0x10
mov ecx, ebx
call fcn.00402fb0
cmp byte [esi + 0x1f70], 0
mov dword [ebp - 0x1c], eax
jne 0x58038d
cmp dword [esi + 0xeb4], 0xd
je 0x58038d
xor edx, edx
jmp 0x580392
mov edx, 4
mov ebx, dword [ebp - 0x8ac]
lea ecx, [eax + 5]
mov eax, ecx
sub eax, edx
xor edx, edx
add eax, 4
div ebx
mov eax, ebx
sub eax, edx
xor edx, edx
div ebx
lea ebx, [esi + 0x92c]
lea eax, [edx + 4]
add ecx, eax
mov dword [ebp - 0x8b4], eax
mov dword [ebp - 0x8bc], ecx
lea eax, [ecx - 4]
mov dword [ebp - 0x8b0], eax
mov eax, dword [ebp - 0x24]
mov dword [eax], ecx
mov ecx, ebx
call fcn.00436dd0
mov eax, dword [esi + 0xeb4]
cmp eax, 0xd
jne 0x580557
mov eax, dword [ebp - 0x8bc]
mov ecx, ebx
add eax, 0x10
push eax
call fcn.00438e30
mov edi, eax
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x8b0]
lea ebx, [esi + 0x1cdc]
mov ecx, eax
mov dword [ebp - 0x8ac], edi
shr ecx, 0x18
mov byte [edi], cl
mov ecx, eax
shr ecx, 0x10
mov byte [edi + 1], cl
mov ecx, eax
mov byte [edi + 3], al
shr ecx, 8
mov byte [edi + 2], cl
mov ecx, dword [esi + 0xa18]
mov eax, ecx
shr eax, 8
mov byte [ebp - 0x13], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0x12], al
lea eax, [ebp - 0x18]
mov byte [ebp - 0x14], cl
push eax
shr ecx, 0x18
push ebx
mov byte [ebp - 0x11], cl
call fcn.005747d0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebx + 0x84]
push eax
call fcn.005747d0
inc dword [ebx + 0xb4]
push 4
push edi
push ebx
call fcn.00574440
mov eax, dword [ebp - 0x8b4]
add esp, 0x1c
mov ecx, dword [ebp - 0x20]
add edi, 4
push dword [ebp - 0x1c]
mov byte [edi], al
call fcn.00438ea0
push eax
mov eax, dword [ebp - 0x8ac]
add eax, 5
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x8ac]
add ecx, 5
add eax, ecx
push eax
push dword [ebp - 0x8b4]
call fcn.0045dff0
push dword [ebp - 0x8b0]
lea eax, [esi + 0x1d60]
push edi
push eax
call fcn.00574440
mov ecx, dword [esi + 0xa18]
xorps xmm0, xmm0
mov eax, ecx
mov dword [ebx + 0x108], 0
shr eax, 0x18
add esp, 0x20
mov byte [ebp - 0x20], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0x1f], al
mov eax, ecx
movq qword [ebx + 0x10c], xmm0
shr eax, 8
mov byte [ebp - 0x1e], al
lea eax, [ebp - 0x20]
push 4
mov byte [ebp - 0x1d], cl
mov ecx, ebx
push eax
call fcn.00572740
push dword [ebp - 0x8bc]
mov edi, dword [ebp - 0x8ac]
mov ecx, ebx
push edi
call fcn.00572740
mov eax, dword [ebp - 0x8bc]
lea ecx, [ebx + 0x114]
add eax, edi
push eax
call fcn.005ac730
mov eax, dword [ebp - 0x8bc]
lea ebx, [esi + 0x92c]
add eax, 0x10
mov ecx, ebx
push eax
call fcn.00435300
jmp 0x580805
cmp eax, 0xe
je 0x5806b9
cmp eax, 0xf
je 0x5806b9
test eax, eax
je 0x58067e
cmp byte [esi + 0x1f70], 0
jne 0x580589
push ebx
push dword [ebp - 0x8b0]
call fcn.005a94a0
add esp, 8
push dword [ebp - 0x8b4]
mov ecx, ebx
call fcn.00435740
push dword [ebp - 0x20]
mov ecx, ebx
call fcn.00435490
push ebx
push dword [ebp - 0x8b4]
call fcn.0045df20
add esp, 8
lea ecx, [esi + 0x910]
call fcn.00436dd0
cmp dword [esi + 0xed0], 0
jne 0x5805d6
mov eax, dword [edi]
mov ecx, edi
push str.No_output_encryptor_
call dword [eax + 0x14]
xor al, al
jmp 0x580b0a
push edi
lea eax, [esi + 0x910]
mov ecx, ebx
push eax
call fcn.00402fb0
push eax
mov ecx, ebx
call fcn.00438ea0
mov ecx, dword [esi + 0xed0]
push eax
lea eax, [esi + 0xfa8]
push eax
lea eax, [esi + 0x15e0]
push eax
call fcn.004f65b0
mov ecx, ebx
call fcn.00402fb0
lea ecx, [esi + 0x910]
mov edi, eax
call fcn.00402fb0
cmp eax, edi
je 0x580805
mov edi, dword [ebp - 0x8b8]
mov ecx, edi
push str.Size_of_encrypted_data_changed_
mov eax, dword [edi]
call dword [eax + 0x14]
mov ecx, ebx
call fcn.00402fb0
push eax
push str.unencryptedPacketSize
mov ecx, edi
call fcn.00448a10
lea ecx, [esi + 0x910]
call fcn.00402fb0
push eax
push str.encryptedPacketSize
mov ecx, edi
call fcn.00448a10
push 0x5d38b0
push str.Failed_to_encrypt.
push str.TRAN
mov ecx, esi
call fcn.00581a10
xor al, al
jmp 0x580b0a
mov edi, dword [ebp - 0x8b0]
push ebx
push edi
call fcn.005a94a0
add esp, 8
mov ecx, ebx
push dword [ebp - 0x8b4]
call fcn.00435740
push dword [ebp - 0x20]
mov ecx, ebx
call fcn.00435490
push ebx
push dword [ebp - 0x8b4]
call fcn.0045df20
add esp, 8
jmp 0x58080b
cmp dword [esi + 0xed0], 0
jne 0x5806d5
mov eax, dword [edi]
mov ecx, edi
push str.No_output_GCM_encryptor_
call dword [eax + 0x14]
xor al, al
jmp 0x580b0a
lea edi, [esi + 0xff8]
mov ecx, edi
call fcn.00436dd0
push edi
push dword [ebp - 0x8b0]
call fcn.005a94a0
add esp, 8
lea eax, [esi + 0x1e80]
lea edi, [esi + 0xfa8]
mov ecx, edi
push eax
lea eax, [esi + 0x1e7c]
push eax
call fcn.004f6990
push dword [ebp - 0x8b8]
mov ecx, dword [esi + 0xed0]
lea ebx, [esi + 0x15e0]
push edi
push ebx
call fcn.00594be0
push dword [ebp - 0x8b4]
lea edi, [esi + 0x92c]
mov ecx, edi
call fcn.00435740
push dword [ebp - 0x20]
mov ecx, edi
call fcn.00435490
push edi
push dword [ebp - 0x8b4]
call fcn.0045df20
add esp, 8
lea edi, [esi + 0x910]
mov ecx, edi
call fcn.00436dd0
push dword [ebp - 0x8b8]
lea ecx, [esi + 0x92c]
push edi
call fcn.00402fb0
push eax
lea ecx, [esi + 0x92c]
call fcn.00438ea0
mov ecx, dword [esi + 0xed0]
lea edi, [esi + 0xfa8]
push eax
push edi
push ebx
call fcn.004f65b0
push dword [ebp - 0x8b8]
mov ecx, dword [esi + 0xed0]
push edi
push ebx
call fcn.00594b20
test al, al
jne 0x5807be
mov ecx, dword [ebp - 0x8b8]
push str.SSH_gcm_encrypt_finalize_failed.
mov eax, dword [ecx]
call dword [eax + 0x14]
xor al, al
jmp 0x580b0a
lea ecx, [esi + 0x1014]
call fcn.00402fb0
cmp eax, 0x10
je 0x5807e5
mov ecx, dword [ebp - 0x8b8]
push str.SSH_GCM_auth_tag_is_not_16_bytes.
mov eax, dword [ecx]
call dword [eax + 0x14]
xor al, al
jmp 0x580b0a
mov edx, 0xffffe180
lea ecx, [esi + 0x1e87]
sub edx, esi
add byte [ecx], 1
jne 0x5807ff
dec ecx
lea eax, [edx + ecx]
test eax, eax
jns 0x5807f2
lea ebx, [esi + 0x92c]
mov edi, dword [ebp - 0x8b0]
mov eax, dword [esi + 0xeb4]
cmp eax, 0xe
je 0x5809e8
cmp eax, 0xf
je 0x5809e8
cmp eax, 0xd
je 0x580a15
lea edi, [esi + 0x8d8]
mov ecx, edi
call fcn.00436dd0
cmp dword [esi + 0xe98], 0
je 0x580984
mov al, byte [esi + 0xa1b]
lea ecx, [ebp - 0x8a4]
mov byte [ebp - 0x24], al
mov al, byte [esi + 0xa1a]
mov byte [ebp - 0x23], al
mov al, byte [esi + 0xa19]
mov byte [ebp - 0x22], al
mov al, byte [esi + 0xa18]
mov byte [ebp - 0x21], al
call fcn.00434dd0
cmp byte [esi + 0x1f70], 0
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 1
mov dword [ebp - 0xa0], 3
mov dword [ebp - 0x8a0], 0
mov dword [ebp - 0x4a0], 0
mov dword [ebp - 0x89c], eax
mov dword [ebp - 0x49c], 4
je 0x580918
mov ecx, dword [ebp - 0x8b0]
mov eax, ecx
shr eax, 0x18
mov byte [ebp - 0x1c], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0x1b], al
mov eax, ecx
shr eax, 8
mov byte [ebp - 0x1a], al
lea eax, [ebp - 0x1c]
mov byte [ebp - 0x19], cl
lea ecx, [esi + 0x910]
mov dword [ebp - 0xa0], 4
mov dword [ebp - 0x898], eax
mov dword [ebp - 0x498], 4
call fcn.00438ea0
lea ecx, [esi + 0x910]
mov dword [ebp - 0x894], eax
call fcn.00402fb0
mov dword [ebp - 0x494], eax
jmp 0x580932
mov ecx, ebx
call fcn.00438ea0
mov ecx, ebx
mov dword [ebp - 0x898], eax
call fcn.00402fb0
mov dword [ebp - 0x498], eax
push dword [ebp - 0x8b8]
lea eax, [esi + 0x8d8]
push eax
push dword [esi + 0x1ef8]
lea ecx, [esi + 0x1f18]
call fcn.00402fb0
push eax
lea ecx, [esi + 0x1f18]
call fcn.00438ea0
push eax
lea eax, [ebp - 0x8a4]
push eax
call fcn.004701b0
add esp, 0x18
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8a4]
call fcn.00435050
lea edi, [esi + 0x8d8]
cmp dword [esi + 0xeb4], 0
lea eax, [esi + 0x910]
je 0x5809c8
cmp byte [esi + 0x1f70], 0
mov ecx, ebx
je 0x5809c2
call fcn.00436dd0
push ebx
push dword [ebp - 0x8b0]
call fcn.005a94a0
add esp, 8
lea eax, [esi + 0x910]
mov ecx, ebx
push eax
call fcn.00435490
jmp 0x5809c8
push eax
call fcn.0043af50
mov ecx, edi
call fcn.00402fb0
test eax, eax
je 0x580a15
cmp dword [esi + 0xe98], 6
jne 0x5809e5
push 8
mov ecx, edi
call fcn.0043ae30
push edi
jmp 0x580a0e
mov ecx, ebx
call fcn.00436dd0
push ebx
push edi
call fcn.005a94a0
add esp, 8
lea eax, [esi + 0x910]
mov ecx, ebx
push eax
call fcn.00435490
lea eax, [esi + 0x1014]
push eax
mov ecx, ebx
call fcn.00435490
mov eax, dword [esi + 0xa20]
mov dword [ebp - 0x8ac], eax
test eax, eax
je 0x580a35
mov ecx, 0xbb8
cmp eax, ecx
cmovb eax, ecx
mov dword [ebp - 0x8ac], eax
mov ecx, dword [ebp - 0x8c0]
test ecx, ecx
je 0x580a46
mov byte [ecx + 0x94], 1
push dword [ebp - 0x8c4]
mov edi, dword [ebp - 0x8b8]
lea ecx, [ebp - 0x28]
push edi
push ecx
push eax
push 0
mov ecx, ebx
mov dword [ebp - 0x28], 0
call fcn.00402fb0
push eax
push ebx
lea ecx, [esi + 0x820]
call fcn.00570890
mov byte [ebp - 0x8a5], al
test al, al
jne 0x580ad3
cmp dword [ebp - 0x28], 0
jbe 0x580ac1
mov ecx, ebx
call fcn.00402fb0
push eax
push str.packetSize
mov ecx, edi
call fcn.00448a10
push dword [ebp - 0x28]
mov ecx, edi
push str.numBytesSent
call fcn.00448a10
push dword [ebp - 0x8ac]
mov ecx, edi
push str.idleTimeoutMs
call fcn.00448a10
push str.Failed_to_send_entire_SSH_packet.
jmp 0x580ac6
push str.SSH_SendBytes_failed.
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x14]
mov al, byte [ebp - 0x8a5]
mov ecx, dword [ebp - 0x8c0]
test ecx, ecx
je 0x580ae4
mov byte [ecx + 0x94], 0
inc dword [esi + 0xa18]
test al, al
jne 0x580b0a
push 0x5d38b0
push str.Failed_to_send.
push str.TRAN
mov ecx, esi
call fcn.00581a10
mov al, byte [ebp - 0x8a5]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005b34c8
mov esp, ebp
pop ebp
ret 0x18