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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov dword [esp + 0x1c], eax
mov ebp, edx
mov esi, ecx
mov ebx, dword [edx]
mov dword [esp + 0x28], 0
mov edx, dword [ebx + 4]
call fcn.004d5128
test eax, eax
jne 0x4d9a78
mov edx, dword [ebx + 0x40]
xor edi, edi
nop
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4d9610
mov ecx, dword [eax + 8]
cmp dword [eax], ecx
jl 0x4d9610
and dword [ebx + 4], 0xffffffbf
mov dword [eax + 0xc], 0
test edx, edx
je 0x4d9629
mov edx, dword [ebx + 0x44]
mov dword [edx + 0xc], eax
mov edx, dword [ebx + 0x40]
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x3c], 0
test esi, esi
jne 0x4d95da
test byte [ebx + 4], 0x80
jne 0x4d9a00
test edx, edx
je 0x4d99c0
mov ecx, dword [edx + 4]
mov eax, dword [edx]
sub eax, ecx
mov dword [esp + 0x18], eax
jne 0x4d9630
xor eax, eax
add ecx, eax
mov dword [edx + 4], ecx
cmp ecx, dword [edx]
je 0x4d96dc
mov edx, dword [ebx + 0x40]
mov edi, 1
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x4d95a3
lea esi, [esi]
mov ecx, dword [ebx + 4]
test cl, 0x40
je 0x4d95cc
test edx, edx
jne 0x4d95cc
and ecx, 0xffffffbf
mov dword [ebx + 4], ecx
mov dword [eax + 0xc], 0
mov dword [ebx + 0x40], eax
mov edx, eax
jmp 0x4d95c2
lea eax, [esp + 0x28]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 8], eax
lea eax, [edx + ecx + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp + 4]
mov dword [esp], eax
mov dword [esp + 0x14], edx
mov ecx, dword [ebp + 8]
call dword [ecx + 0x10]
test eax, eax
mov edx, dword [esp + 0x14]
jns 0x4d99f8
mov eax, dword [esp + 0x28]
cmp eax, 4
je 0x4d9700
cmp eax, 0xb
je 0x4d9710
test esi, esi
je 0x4d9968
mov edx, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x2c]
test ecx, ecx
je 0x4d9750
mov dword [ebx + 0x80], 0
test edx, edx
je 0x4d96bf
mov eax, dword [edx]
dec eax
mov dword [edx], eax
test eax, eax
jg 0x4d96bf
jmp 0x4d9a0a
mov eax, dword [edx + 0xc]
mov dword [ebx + 0x40], eax
xor ecx, ecx
mov eax, ebx
call fcn.004d4bdc
mov edx, dword [ebx + 0x40]
test edx, edx
jne 0x4d96b0
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], 0
xor edx, edx
jmp 0x4d959c
mov eax, dword [edx + 0xc]
mov dword [ebx + 0x40], eax
test eax, eax
je 0x4d99d0
xor ecx, ecx
mov eax, ebx
call fcn.004d4bdc
mov edx, dword [ebx + 0x40]
mov edi, 1
jmp 0x4d959c
mov dword [esp + 0x28], 0
mov edx, dword [ebx + 0x40]
jmp 0x4d959c
mov eax, dword [ebx + 4]
mov edx, eax
and edx, 0x80
je 0x4d99dc
mov dword [esp + 0x28], 0
test edx, edx
je 0x4d973c
test edi, edi
jne 0x4d9741
mov edx, dword [ebx + 0x40]
test edx, edx
je 0x4d9a25
test ah, 1
jne 0x4d9768
mov eax, dword [esp + 0x28]
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x84], edx
test edx, edx
je 0x4d96bf
inc dword [edx]
jmp 0x4d96bf
mov eax, dword [ebx + 0x30]
test eax, eax
jg 0x4d9741
mov eax, dword [ebx + 0x40]
test eax, eax
jne 0x4d9741
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4d9784
mov edx, dword [eax + 4]
cmp dword [eax], edx
jne 0x4d9741
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], ecx
mov dword [esp + 4], 0x24
mov dword [esp], 0x67e770
call fcn.0050879c
mov edi, eax
mov ebx, dword [ebp]
mov edx, 1
mov eax, ebx
call fcn.004d50d4
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4d97c7
mov dword [esp], eax
call fcn.004ed958
mov dword [ebx + 0x3c], 0
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x4d97da
mov dword [esp], str.TclFlush__closed_channel:_queued_output_left
call fcn.00508428
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x4d97eb
test byte [ebx + 4], 4
jne 0x4d9b6f
mov eax, dword [ebx + 0x80]
test eax, eax
je 0x4d982a
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x4d9813
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.004d8d4c
mov eax, dword [ebx + 0x80]
mov edx, dword [eax]
dec edx
mov dword [eax], edx
test edx, edx
jle 0x4d9b54
mov dword [ebx + 0x80], 0
mov dword [esp + 4], 0x24
mov dword [esp], 0x67e770
call fcn.0050879c
mov esi, dword [ebp]
mov edx, dword [eax + 4]
test edx, edx
je 0x4d9bd8
cmp esi, edx
jne 0x4d9862
jmp 0x4d9bcd
mov edx, eax
test eax, eax
je 0x4d9bd8
mov eax, dword [edx + 0x78]
cmp esi, eax
jne 0x4d9858
mov eax, dword [esi + 0x78]
mov dword [edx + 0x78], eax
mov dword [esi + 0x78], 0
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
cmp edx, 2
je 0x4d9898
cmp edx, 3
je 0x4d9898
cmp edx, 4
je 0x4d9beb
cmp edx, 5
je 0x4d9beb
mov edx, dword [eax + 8]
cmp edx, 1
je 0x4d9b36
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 4]
mov dword [esp], eax
call edx
cmp ebp, dword [ebx + 0x74]
je 0x4d9ae4
mov esi, dword [ebx + 0x2c]
test esi, esi
je 0x4d9a82
mov eax, dword [ebx + 0x80]
test eax, eax
je 0x4d98e9
mov edx, dword [eax]
dec edx
mov dword [eax], edx
test edx, edx
jle 0x4d9c0e
mov dword [ebx + 0x80], 0
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4d9907
mov eax, dword [ebx + 0x84]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.004d8d4c
mov eax, esi
mov edx, dword [ebx + 0x64]
mov dword [esp], edx
mov dword [esp + 0x14], eax
call fcn.004d344c
mov esi, dword [ebp + 0xc]
test esi, esi
mov eax, dword [esp + 0x14]
je 0x4d9aa7
mov eax, dword [edi + 4]
mov dword [ebx + 0x78], eax
mov dword [edi + 4], ebx
mov dword [ebx + 0x70], esi
mov dword [esi + 0x10], 0
mov dword [ebp + 8], 0
mov dword [esp + 4], 3
mov dword [esp], ebp
call fcn.005095c8
mov dword [esp + 4], esi
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.004d918c
jmp 0x4d9745
mov dword [esp], eax
call fcn.0050543c
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4d96bf
mov dword [esp + 4], ebp
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.00512b64
test eax, eax
jne 0x4d96bf
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.00505450
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.004e0924
jmp 0x4d96bf
mov eax, dword [ebx + 4]
mov edx, eax
and edx, 0x80
jmp 0x4d9729
mov dword [ebx + 0x44], 0
jmp 0x4d96ea
or al, 0x80
mov dword [ebx + 4], eax
mov eax, ebp
call fcn.004d45b8
mov eax, dword [ebx + 4]
mov edx, eax
and edx, 0x80
jmp 0x4d9721
mov ecx, dword [edx + 4]
jmp 0x4d95f1
xor eax, eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edx + 0xc]
test eax, eax
je 0x4d9a45
mov eax, dword [eax + 4]
test eax, eax
je 0x4d9a45
mov dword [esp], edx
call fcn.004dd138
jmp 0x4d96bf
and al, 0x7f
mov dword [ebx + 4], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebx + 0x58]
mov dword [esp + 4], edx
mov edx, dword [ebp + 4]
mov dword [esp], edx
call dword [eax + 0x20]
mov eax, dword [ebx + 4]
jmp 0x4d973c
mov eax, dword [edx + 4]
test eax, eax
je 0x4d9a64
cmp eax, dword [0x5e022c]
je 0x4d9a64
mov dword [esp], eax
mov dword [esp + 0x14], edx
call fcn.004ed958
mov edx, dword [esp + 0x14]
mov dword [edx + 8], 0xffffffff
mov dword [esp], edx
call fcn.0050cc38
jmp 0x4d96bf
mov eax, 0xffffffff
jmp 0x4d9745
mov edx, dword [esp + 0x18]
test edx, edx
jne 0x4d9adb
test eax, eax
je 0x4d9909
mov dword [esp], eax
mov dword [esp + 0x14], eax
call fcn.0050543c
mov eax, dword [esp + 0x14]
jmp 0x4d9909
mov dword [ebp + 8], 0
mov dword [esp + 4], 3
mov dword [esp], ebx
mov dword [esp + 0x14], eax
call fcn.005095c8
mov dword [esp + 4], 3
mov dword [esp], ebp
call fcn.005095c8
mov eax, dword [esp + 0x14]
jmp 0x4d9745
mov eax, dword [esp + 0x18]
jmp 0x4d9909
mov edx, dword [ebx]
test edx, edx
je 0x4d9b00
mov dword [esp], edx
mov dword [esp + 0x14], eax
call fcn.004ed958
mov dword [ebx], 0
mov eax, dword [esp + 0x14]
mov edx, dword [ebx + 8]
mov dword [esp], edx
mov dword [esp + 0x14], eax
call fcn.004f98d4
mov edx, dword [ebx + 0x38]
test edx, edx
mov eax, dword [esp + 0x14]
je 0x4d98bd
mov dword [esp], edx
call fcn.004ed958
mov dword [ebx + 0x38], 0
mov eax, dword [esp + 0x14]
jmp 0x4d98bd
mov dword [esp + 8], 0
mov edx, dword [esp + 0x1c]
mov dword [esp + 4], edx
mov edx, dword [ebp + 4]
mov dword [esp], edx
call dword [eax + 0x28]
jmp 0x4d98b4
mov edx, dword [eax + 0xc]
test edx, edx
je 0x4d9b9c
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x4d9b9c
mov dword [esp], eax
call fcn.004dd138
jmp 0x4d9820
mov byte [esp + 0x27], al
mov eax, dword [ebp + 8]
lea edx, [esp + 0x2c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 1
lea edx, [esp + 0x27]
mov dword [esp + 4], edx
mov edx, dword [ebp + 4]
mov dword [esp], edx
call dword [eax + 0x10]
jmp 0x4d97eb
mov edx, dword [eax + 4]
test edx, edx
je 0x4d9bb9
cmp edx, dword [0x5e022c]
je 0x4d9bb9
mov dword [esp], edx
call fcn.004ed958
mov eax, dword [ebx + 0x80]
mov dword [eax + 8], 0xffffffff
mov dword [esp], eax
call fcn.0050cc38
jmp 0x4d9820
mov edx, dword [esi + 0x78]
mov dword [eax + 4], edx
jmp 0x4d986f
mov dword [esp], str.FlushChannel:_damaged_channel_list
call fcn.00508428
xor edx, edx
jmp 0x4d9869
mov edx, dword [eax + 0x3c]
test edx, edx
je 0x4d9898
mov dword [esp + 4], 1
mov eax, dword [ebp + 4]
mov dword [esp], eax
call edx
mov eax, dword [ebp + 8]
jmp 0x4d9898
mov edx, dword [eax + 0xc]
test edx, edx
je 0x4d9c29
mov edx, dword [edx + 4]
test edx, edx
je 0x4d9c29
mov dword [esp], eax
call fcn.004dd138
jmp 0x4d98df
mov edx, dword [eax + 4]
test edx, edx
je 0x4d9c46
cmp edx, dword [0x5e022c]
je 0x4d9c46
mov dword [esp], edx
call fcn.004ed958
mov eax, dword [ebx + 0x80]
mov dword [eax + 8], 0xffffffff
mov dword [esp], eax
call fcn.0050cc38
jmp 0x4d98df