Function at 0x4917f0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x6019e4]
xor eax, esp
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 8], eax
push esi
mov esi, dword [ebp + 0x14]
mov eax, dword [ebx]
push edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0xc], ecx
mov edi, dword [eax + 4]
mov dword [esp + 0x1c], esi
cmp dword [edi + 8], 0
je 0x4918e1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi + 8], eax
je 0x4918dd
mov eax, dword [esp + 0xc]
add eax, 0x14
push eax
mov dword [esp + 0x18], eax
call fcn.0058db11
mov edi, eax
add esp, 4
test edi, edi
je 0x491b4d
push dword [esp + 0x14]
push 0
push edi
call fcn.00587250
mov eax, dword [ebx]
lea ecx, [edi + 0x14]
add esp, 0xc
mov eax, dword [eax + 4]
mov dword [edi], eax
mov eax, dword [ebx + 0x10]
mov dword [edi + 4], eax
mov eax, dword [esp + 0xc]
mov edx, eax
push eax
push dword [esp + 0x14]
mov dword [edi + 8], ebx
mov dword [edi + 0xc], esi
mov dword [edi + 0x10], eax
call fcn.00401000
mov esi, dword [edi]
add esp, 8
cmp dword [esi + 8], 0
je 0x4918be
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
je 0x4918be
mov ecx, dword [edi]
mov edx, fcn.004917a0
push edi
push 0
call fcn.004af160
jmp 0x4918c6
push edi
push dword [edi]
call fcn.004917a0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xc]
mov edx, dword [esi + 0x10]
mov eax, edx
sub eax, dword [esi]
mov edi, dword [esi + 4]
sub eax, edi
cmp eax, ecx
jge 0x49195d
test edi, edi
jle 0x491910
mov eax, dword [esi]
mov ecx, dword [esi + 0xc]
add eax, ecx
push edi
push eax
call fcn.0048d330
mov ecx, dword [esp + 0x14]
add esp, 8
mov dword [esi], 0
mov edi, dword [esi + 0x10]
mov eax, edi
mov edx, dword [esi + 4]
sub eax, edx
cmp eax, ecx
jge 0x49195d
mov eax, edi
sub eax, edx
cmp eax, ecx
jge 0x49193f
nop word [eax + eax]
add eax, 0x1000
add edi, 0x1000
cmp eax, ecx
jl 0x491930
push edi
push dword [esi + 0xc]
call fcn.0059256f
add esp, 8
mov dword [esi + 0xc], eax
test eax, eax
je 0x491b8e
mov ecx, dword [esp + 0xc]
mov dword [esi + 0x10], edi
mov edx, dword [esi + 0x10]
sub edx, dword [esi]
sub edx, dword [esi + 4]
push ecx
mov ecx, dword [esi + 0xc]
add ecx, dword [esi]
push dword [esp + 0x14]
add ecx, dword [esi + 4]
call fcn.00401000
mov eax, dword [esp + 0x14]
add esp, 8
add dword [esi + 4], eax
mov dword [esp + 0x14], 0
nop dword [eax]
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x10]
mov ecx, dword [ecx]
call fcn.00415060
mov eax, dword [ebx]
mov ecx, dword [eax]
mov dword [esp + 0xc], ecx
mov eax, dword [ecx + 0x44]
sub eax, dword [ecx + 0x40]
sar eax, 3
lea edx, [eax - 1]
mov dword [esp + 0x10], edx
cmp edx, eax
jae 0x491c07
mov edi, 0x611cf8
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4919c4
sub edi, edx
mov edx, 0x611cf8
push edi
call fcn.004140e0
mov edx, dword [esp + 0x14]
add esp, 4
mov ecx, dword [esp + 0xc]
call fcn.0040fdd0
mov eax, dword [ebx]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x40]
mov eax, dword [ecx + 0x44]
sub eax, edx
mov dword [esp + 0xc], edx
sar eax, 3
lea edi, [eax - 2]
mov dword [esp + 0x10], edi
cmp edi, eax
jae 0x491bf6
lea edi, [eax - 1]
cmp edi, eax
jae 0x491be5
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
mov ecx, dword [edx + eax*8]
mov edx, dword [edx + eax*8 + 4]
mov eax, dword [esp + 0xc]
mov eax, dword [eax + edi*8]
mov dword [esi + ebx*8], eax
mov eax, esi
mov eax, dword [eax + edi*8 + 4]
mov dword [esi + ebx*8 + 4], eax
mov eax, esi
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov dword [eax + edi*8 + 4], edx
mov edx, 0x611d00
mov dword [eax + edi*8], ecx
mov eax, dword [ebx]
lea edi, [edx + 1]
mov ecx, dword [eax]
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x491a60
sub edx, edi
push edx
mov edx, 0x611d00
call fcn.004140e0
mov eax, dword [ebx]
add esp, 4
mov edx, 1
mov ecx, dword [eax]
push 0
call fcn.0040e880
add esp, 4
test eax, eax
je 0x491a9f
mov eax, dword [ebx]
push str.DynamicBuffer.WriteSink___readable__:
push dword [eax]
call fcn.00471950
add esp, 8
mov eax, dword [ebx]
mov edi, dword [eax]
mov ecx, dword [edi + 0x44]
cmp ecx, dword [edi + 0x40]
je 0x491bcf
add ecx, 0xfffffff8
mov dword [edi + 0x44], ecx
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
mov dword [esp + 0x24], eax
mov eax, 0xfff3
mov word [ecx + 6], ax
mov eax, 0xfff8
cmp word [esp + 0x26], ax
jb 0x491ae3
add dword [edx + 4], 0xffffffff
jne 0x491ae3
push edx
push edi
call fcn.00432010
add esp, 8
mov ecx, ebx
call fcn.004aed40
test eax, eax
je 0x491b03
mov eax, dword [esi]
xor edx, edx
push dword [esi + 4]
add eax, dword [esi + 0xc]
mov ecx, dword [ebx]
push eax
call fcn.004978c0
add esp, 8
mov eax, dword [esi + 8]
test eax, eax
jne 0x491b15
mov edi, dword [esp + 0x14]
mov dword [esi + 4], eax
mov dword [esi], eax
jmp 0x491b2e
mov edi, dword [esi + 4]
sub edi, eax
mov dword [esp + 0x14], edi
test edi, edi
jle 0x491b30
add dword [esi], edi
mov dword [esi + 4], eax
mov dword [esi + 8], 0
test edi, edi
jne 0x491990
mov ecx, dword [esp + 0x34]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x4c4
mov edx, 0x624148
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0x4c4
push 0x624164
push 0x624180
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.005885bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x43f
mov edx, 0x611c84
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0x43f
push 0x611cac
push 0x611cd4
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.005885bd
push 0x605c78
push 0x300167f
mov edx, 0x605c88
mov ecx, edi
call fcn.0040d970
push 0xffffffffffffffff
push 0x178
mov edx, 0x605594
call fcn.0040d9d0
push 0xfffffffffffffffe
push 0x178
mov edx, 0x605594
call fcn.0040d9d0
push 0xffffffffffffffff
push str.invalid_stack_index__ld
push 0x300012c
push 0x605584
push ecx
call fcn.0040d900
int3