Function at 0x4d9c88
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.004d5844
test eax, eax
jne 0x4da194
mov edx, dword [ebx + 0x40]
xor edi, edi
nop
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4d9d2c
mov ecx, dword [eax + 8]
cmp dword [eax], ecx
jl 0x4d9d2c
and dword [ebx + 4], 0xffffffbf
mov dword [eax + 0xc], 0
test edx, edx
je 0x4d9d45
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 0x4d9cf6
test byte [ebx + 4], 0x80
jne 0x4da11c
test edx, edx
je 0x4da0dc
mov ecx, dword [edx + 4]
mov eax, dword [edx]
sub eax, ecx
mov dword [esp + 0x18], eax
jne 0x4d9d4c
xor eax, eax
add ecx, eax
mov dword [edx + 4], ecx
cmp ecx, dword [edx]
je 0x4d9df8
mov edx, dword [ebx + 0x40]
mov edi, 1
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x4d9cbf
lea esi, [esi]
mov ecx, dword [ebx + 4]
test cl, 0x40
je 0x4d9ce8
test edx, edx
jne 0x4d9ce8
and ecx, 0xffffffbf
mov dword [ebx + 4], ecx
mov dword [eax + 0xc], 0
mov dword [ebx + 0x40], eax
mov edx, eax
jmp 0x4d9cde
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 0x4da114
mov eax, dword [esp + 0x28]
cmp eax, 4
je 0x4d9e1c
cmp eax, 0xb
je 0x4d9e2c
test esi, esi
je 0x4da084
mov edx, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x2c]
test ecx, ecx
je 0x4d9e6c
mov dword [ebx + 0x80], 0
test edx, edx
je 0x4d9ddb
mov eax, dword [edx]
dec eax
mov dword [edx], eax
test eax, eax
jg 0x4d9ddb
jmp 0x4da126
mov eax, dword [edx + 0xc]
mov dword [ebx + 0x40], eax
xor ecx, ecx
mov eax, ebx
call fcn.004d52f8
mov edx, dword [ebx + 0x40]
test edx, edx
jne 0x4d9dcc
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], 0
xor edx, edx
jmp 0x4d9cb8
mov eax, dword [edx + 0xc]
mov dword [ebx + 0x40], eax
test eax, eax
je 0x4da0ec
xor ecx, ecx
mov eax, ebx
call fcn.004d52f8
mov edx, dword [ebx + 0x40]
mov edi, 1
jmp 0x4d9cb8
mov dword [esp + 0x28], 0
mov edx, dword [ebx + 0x40]
jmp 0x4d9cb8
mov eax, dword [ebx + 4]
mov edx, eax
and edx, 0x80
je 0x4da0f8
mov dword [esp + 0x28], 0
test edx, edx
je 0x4d9e58
test edi, edi
jne 0x4d9e5d
mov edx, dword [ebx + 0x40]
test edx, edx
je 0x4da141
test ah, 1
jne 0x4d9e84
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 0x4d9ddb
inc dword [edx]
jmp 0x4d9ddb
mov eax, dword [ebx + 0x30]
test eax, eax
jg 0x4d9e5d
mov eax, dword [ebx + 0x40]
test eax, eax
jne 0x4d9e5d
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4d9ea0
mov edx, dword [eax + 4]
cmp dword [eax], edx
jne 0x4d9e5d
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], ecx
mov dword [esp + 4], 0x24
mov dword [esp], 0x68b770
call fcn.00509044
mov edi, eax
mov ebx, dword [ebp]
mov edx, 1
mov eax, ebx
call fcn.004d57f0
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4d9ee3
mov dword [esp], eax
call fcn.004ee144
mov dword [ebx + 0x3c], 0
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x4d9ef6
mov dword [esp], str.TclFlush__closed_channel:_queued_output_left
call fcn.00508cd0
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x4d9f07
test byte [ebx + 4], 4
jne 0x4da28b
mov eax, dword [ebx + 0x80]
test eax, eax
je 0x4d9f46
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x4d9f2f
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.004d9468
mov eax, dword [ebx + 0x80]
mov edx, dword [eax]
dec edx
mov dword [eax], edx
test edx, edx
jle 0x4da270
mov dword [ebx + 0x80], 0
mov dword [esp + 4], 0x24
mov dword [esp], 0x68b770
call fcn.00509044
mov esi, dword [ebp]
mov edx, dword [eax + 4]
test edx, edx
je 0x4da2f4
cmp esi, edx
jne 0x4d9f7e
jmp 0x4da2e9
mov edx, eax
test eax, eax
je 0x4da2f4
mov eax, dword [edx + 0x78]
cmp esi, eax
jne 0x4d9f74
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 0x4d9fb4
cmp edx, 3
je 0x4d9fb4
cmp edx, 4
je 0x4da307
cmp edx, 5
je 0x4da307
mov edx, dword [eax + 8]
cmp edx, 1
je 0x4da252
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 0x4da200
mov esi, dword [ebx + 0x2c]
test esi, esi
je 0x4da19e
mov eax, dword [ebx + 0x80]
test eax, eax
je 0x4da005
mov edx, dword [eax]
dec edx
mov dword [eax], edx
test edx, edx
jle 0x4da32a
mov dword [ebx + 0x80], 0
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4da023
mov eax, dword [ebx + 0x84]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.004d9468
mov eax, esi
mov edx, dword [ebx + 0x64]
mov dword [esp], edx
mov dword [esp + 0x14], eax
call fcn.004d3b68
mov esi, dword [ebp + 0xc]
test esi, esi
mov eax, dword [esp + 0x14]
je 0x4da1c3
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.00509e70
mov dword [esp + 4], esi
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.004d98a8
jmp 0x4d9e61
mov dword [esp], eax
call fcn.00505cd8
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4d9ddb
mov dword [esp + 4], ebp
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.00513438
test eax, eax
jne 0x4d9ddb
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.00505cec
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.004e1040
jmp 0x4d9ddb
mov eax, dword [ebx + 4]
mov edx, eax
and edx, 0x80
jmp 0x4d9e45
mov dword [ebx + 0x44], 0
jmp 0x4d9e06
or al, 0x80
mov dword [ebx + 4], eax
mov eax, ebp
call fcn.004d4cd4
mov eax, dword [ebx + 4]
mov edx, eax
and edx, 0x80
jmp 0x4d9e3d
mov ecx, dword [edx + 4]
jmp 0x4d9d0d
xor eax, eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edx + 0xc]
test eax, eax
je 0x4da161
mov eax, dword [eax + 4]
test eax, eax
je 0x4da161
mov dword [esp], edx
call fcn.004dd854
jmp 0x4d9ddb
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 0x4d9e58
mov eax, dword [edx + 4]
test eax, eax
je 0x4da180
cmp eax, dword [0x5ef7cc]
je 0x4da180
mov dword [esp], eax
mov dword [esp + 0x14], edx
call fcn.004ee144
mov edx, dword [esp + 0x14]
mov dword [edx + 8], 0xffffffff
mov dword [esp], edx
call fcn.0050d50c
jmp 0x4d9ddb
mov eax, 0xffffffff
jmp 0x4d9e61
mov edx, dword [esp + 0x18]
test edx, edx
jne 0x4da1f7
test eax, eax
je 0x4da025
mov dword [esp], eax
mov dword [esp + 0x14], eax
call fcn.00505cd8
mov eax, dword [esp + 0x14]
jmp 0x4da025
mov dword [ebp + 8], 0
mov dword [esp + 4], 3
mov dword [esp], ebx
mov dword [esp + 0x14], eax
call fcn.00509e70
mov dword [esp + 4], 3
mov dword [esp], ebp
call fcn.00509e70
mov eax, dword [esp + 0x14]
jmp 0x4d9e61
mov eax, dword [esp + 0x18]
jmp 0x4da025
mov edx, dword [ebx]
test edx, edx
je 0x4da21c
mov dword [esp], edx
mov dword [esp + 0x14], eax
call fcn.004ee144
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.004fa0c0
mov edx, dword [ebx + 0x38]
test edx, edx
mov eax, dword [esp + 0x14]
je 0x4d9fd9
mov dword [esp], edx
call fcn.004ee144
mov dword [ebx + 0x38], 0
mov eax, dword [esp + 0x14]
jmp 0x4d9fd9
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 0x4d9fd0
mov edx, dword [eax + 0xc]
test edx, edx
je 0x4da2b8
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x4da2b8
mov dword [esp], eax
call fcn.004dd854
jmp 0x4d9f3c
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 0x4d9f07
mov edx, dword [eax + 4]
test edx, edx
je 0x4da2d5
cmp edx, dword [0x5ef7cc]
je 0x4da2d5
mov dword [esp], edx
call fcn.004ee144
mov eax, dword [ebx + 0x80]
mov dword [eax + 8], 0xffffffff
mov dword [esp], eax
call fcn.0050d50c
jmp 0x4d9f3c
mov edx, dword [esi + 0x78]
mov dword [eax + 4], edx
jmp 0x4d9f8b
mov dword [esp], str.FlushChannel:_damaged_channel_list
call fcn.00508cd0
xor edx, edx
jmp 0x4d9f85
mov edx, dword [eax + 0x3c]
test edx, edx
je 0x4d9fb4
mov dword [esp + 4], 1
mov eax, dword [ebp + 4]
mov dword [esp], eax
call edx
mov eax, dword [ebp + 8]
jmp 0x4d9fb4
mov edx, dword [eax + 0xc]
test edx, edx
je 0x4da345
mov edx, dword [edx + 4]
test edx, edx
je 0x4da345
mov dword [esp], eax
call fcn.004dd854
jmp 0x4d9ffb
mov edx, dword [eax + 4]
test edx, edx
je 0x4da362
cmp edx, dword [0x5ef7cc]
je 0x4da362
mov dword [esp], edx
call fcn.004ee144
mov eax, dword [ebx + 0x80]
mov dword [eax + 8], 0xffffffff
mov dword [esp], eax
call fcn.0050d50c
jmp 0x4d9ffb