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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xac
mov edi, dword [esp + 0xc0]
mov ebp, dword [esp + 0xc4]
mov esi, dword [edi]
mov edx, 2
mov eax, esi
call fcn.004d462c
test eax, eax
jne 0x4d6bac
mov ebx, dword [esi + 8]
test ebx, ebx
je 0x4d6c90
mov eax, dword [esi + 0x70]
mov dword [esp + 0x3c], eax
mov edi, dword [esi + 0x4c]
mov eax, dword [ebp + 4]
test eax, eax
je 0x4d6e0d
mov eax, dword [ebp + 8]
mov dword [esp + 0x6c], eax
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x48], ecx
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x44], ecx
test edi, edi
je 0x4d6e00
mov ecx, dword [edi + 4]
mov dword [esp + 0x4c], ecx
test ebx, ebx
je 0x4d6e22
mov dword [esp + 0x7c], ebp
lea eax, [esp + 0x70]
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], edi
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
mov eax, dword [ebp + 4]
add eax, dword [esp + 0x6c]
mov dword [esp + 0x70], eax
mov edi, dword [esi + 0x24]
mov dword [esp + 0x40], 0
lea edx, [esp + 0x7c]
mov eax, dword [esp + 0x3c]
call fcn.004d5648
test eax, eax
jne 0x4d6ead
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x94]
add edx, ecx
test edi, edi
je 0x4d6974
mov eax, ecx
cmp edx, ecx
jbe 0x4d6974
movsx ebx, byte [ecx]
cmp ebx, edi
jne 0x4d696f
jmp 0x4d6b00
movsx ebx, byte [eax]
cmp ebx, edi
je 0x4d6b00
inc eax
cmp edx, eax
jne 0x4d6964
mov eax, dword [esi + 0x1c]
cmp eax, 1
je 0x4d6b12
jae 0x4d69c8
mov ebx, ecx
mov eax, dword [esi + 4]
test ah, 0x10
jne 0x4d6bbc
cmp edx, ebx
ja 0x4d69a1
jmp 0x4d69d6
cmp al, 0xa
je 0x4d6a1a
inc ebx
cmp ebx, edx
je 0x4d69d6
mov al, byte [ebx]
cmp al, 0xd
jne 0x4d6998
lea ecx, [ebx + 1]
cmp ecx, edx
je 0x4d6f3f
mov edi, dword [esp + 0x88]
xor edx, edx
cmp byte [ecx], 0xa
sete dl
inc edx
lea ebx, [ecx - 1]
jmp 0x4d6a26
cmp eax, 2
je 0x4d6a04
cmp eax, 3
je 0x4d6b3c
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x4d69ef
or ah, 6
mov dword [esi + 4], eax
or dword [esi + 0x10], 2
mov edx, dword [esp + 0x40]
test ah, 2
jne 0x4d6f1e
mov dword [esp + 0x70], edx
jmp 0x4d692c
mov ebx, ecx
cmp ecx, edx
jae 0x4d69d6
cmp byte [ecx], 0xa
je 0x4d6a1a
nop
inc ebx
cmp ebx, edx
je 0x4d69d6
cmp byte [ebx], 0xa
jne 0x4d6a10
mov edi, dword [esp + 0x88]
mov edx, 1
test edi, edi
je 0x4d6e94
mov eax, dword [esp + 0x8c]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x70]
lea ecx, [esp + 0x98]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], 0
lea ecx, [esp + 0x90]
mov dword [esp + 0x20], ecx
mov ecx, ebx
sub ecx, eax
lea ecx, [edx + ecx + 3]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
lea eax, [esi + 0xc]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0xc], eax
mov eax, dword [edi + 4]
lea eax, [edi + eax + 0x10]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 4], eax
mov dword [esp], 0
mov dword [esp + 0x34], edx
call fcn.004fb9c8
mov eax, dword [esp + 0x90]
add dword [edi + 4], eax
sub ebx, dword [ebp + 4]
mov dword [esp + 4], ebx
mov dword [esp], ebp
call fcn.004eb04c
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx]
call fcn.004d58fc
and dword [esi + 4], 0xfffff7ff
mov ebx, dword [esp + 0x9c]
add ebx, dword [esp + 0x98]
mov edx, dword [esp + 0x34]
sub ebx, edx
mov eax, dword [esp + 0x3c]
call fcn.004d45b8
mov eax, ebx
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, eax
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x1c]
cmp eax, 1
jne 0x4d6980
mov ebx, ecx
cmp ecx, edx
jae 0x4d69d6
cmp byte [ecx], 0xd
je 0x4d6a1a
lea esi, [esi]
inc ebx
cmp ebx, edx
je 0x4d69d6
cmp byte [ebx], 0xd
jne 0x4d6b28
jmp 0x4d6a1a
mov ebx, ecx
cmp ecx, edx
jb 0x4d6b51
jmp 0x4d69d6
inc ebx
cmp ebx, edx
jae 0x4d69d6
cmp byte [ebx], 0xd
jne 0x4d6b48
inc ebx
cmp ebx, edx
jb 0x4d6b93
cmp ebx, dword [esp + 0x40]
je 0x4d6b8b
sub ebx, dword [ebp + 4]
mov dword [esp + 0x70], edx
lea edx, [esp + 0x7c]
mov eax, dword [esp + 0x3c]
call fcn.004d5648
test eax, eax
jne 0x4d6ead
mov edx, dword [esp + 0x70]
add edx, dword [esp + 0x94]
add ebx, dword [ebp + 4]
cmp ebx, edx
jae 0x4d6f10
cmp byte [ebx], 0xa
jne 0x4d6b48
dec ebx
mov edi, dword [esp + 0x88]
mov edx, 2
jmp 0x4d6a26
mov dword [esp + 0x3c], edi
mov ebx, 0xffffffff
jmp 0x4d6ae8
and ah, 0xef
mov dword [esi + 4], eax
cmp ecx, edx
jae 0x4d69d6
cmp byte [ecx], 0xa
jne 0x4d69a1
mov ebx, dword [esp + 0x88]
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
lea eax, [esp + 0x74]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 4
lea ecx, [esp + 0x78]
mov dword [esp + 0x18], ecx
lea eax, [esp + 0x8c]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 4]
lea eax, [ebx + eax + 0x10]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 4], eax
mov dword [esp], 0
mov dword [esp + 0x34], edx
call fcn.004fb9c8
mov eax, dword [esp + 0x74]
add dword [ebx + 4], eax
sub dword [esp + 0x90], eax
dec dword [esp + 0x94]
dec dword [esp + 0x98]
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x34]
mov ecx, edx
sub ecx, eax
mov dword [esp + 8], ecx
lea ecx, [eax + 1]
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov edx, dword [esp + 0x34]
dec edx
mov ebx, dword [esp + 0x70]
jmp 0x4d6990
mov eax, dword [esi + 0x1c]
dec eax
cmp eax, 1
ja 0x4d6881
mov ebx, dword [edi]
mov eax, dword [ebx + 0x70]
mov dword [esp + 0x4c], eax
mov edx, dword [ebx + 0x4c]
lea eax, [esp + 0x74]
mov dword [esp + 4], eax
mov dword [esp], ebp
mov dword [esp + 0x34], edx
call fcn.004e8c80
mov ecx, dword [ebx + 0x10]
mov dword [esp + 0x5c], ecx
mov eax, dword [esp + 0x74]
mov dword [esp + 0x54], eax
mov edx, dword [esp + 0x34]
test edx, edx
je 0x4d7161
mov ecx, dword [edx + 4]
mov dword [esp + 0x58], ecx
mov eax, dword [ebx + 0x24]
mov dword [esp + 0x40], eax
xor ecx, ecx
cmp dword [ebx + 0x1c], 2
setne cl
mov esi, ecx
lea esi, [esi + esi*2 + 0xa]
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x50], ebp
mov ebp, esi
test edx, edx
je 0x4d707c
mov ecx, dword [esp + 0x44]
add ecx, dword [edx + 4]
mov dword [edx + 4], ecx
mov eax, dword [edx]
cmp ecx, eax
jl 0x4d6d30
mov edx, dword [edx + 0xc]
test edx, edx
je 0x4d707c
mov eax, dword [edx]
cmp eax, 0x10
je 0x4d707c
mov ecx, dword [edx + 4]
lea ecx, [edx + ecx + 0x10]
mov dword [esp + 0x3c], ecx
lea ecx, [edx + eax + 0x10]
mov edi, dword [esp + 0x40]
test edi, edi
je 0x4d6ff0
cmp dword [esp + 0x3c], ecx
jae 0x4d6d9c
mov eax, dword [esp + 0x3c]
movzx edi, byte [eax]
cmp dword [esp + 0x40], edi
jne 0x4d6d79
jmp 0x4d71e3
movzx esi, byte [eax]
cmp dword [esp + 0x40], esi
je 0x4d6fea
inc eax
cmp eax, ecx
jne 0x4d6d6c
cmp ebp, edi
je 0x4d718f
mov eax, dword [esp + 0x3c]
jmp 0x4d6d97
movzx esi, byte [eax]
cmp esi, ebp
je 0x4d7006
inc eax
cmp ecx, eax
ja 0x4d6d8c
mov eax, dword [ebx + 4]
mov esi, dword [esp + 0x48]
test esi, esi
je 0x4d6db1
or ah, 6
mov dword [ebx + 4], eax
or dword [ebx + 0x10], 2
test ah, 2
jne 0x4d7200
sub ecx, dword [esp + 0x3c]
mov dword [esp + 0x44], ecx
mov eax, dword [esp + 0x74]
add eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov dword [esp + 0x34], edx
call fcn.004e8cbc
add eax, dword [esp + 0x74]
mov edi, eax
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x44]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x44]
add dword [esp + 0x74], ecx
mov edx, dword [esp + 0x34]
jmp 0x4d6d0b
mov dword [esp + 0x4c], 0x10
jmp 0x4d68ba
lea eax, [esp + 0x6c]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004dd5bc
jmp 0x4d689d
mov dword [esp + 4], 0x24
mov dword [esp], 0x67e770
call fcn.0050879c
mov ebx, dword [eax + 0x20]
test ebx, ebx
jne 0x4d68c2
mov dword [esp + 4], 0x60b3d8
mov dword [esp], 0
mov dword [esp + 0x34], eax
call fcn.004fac84
mov edx, dword [esp + 0x34]
mov dword [edx + 0x20], eax
mov dword [esp + 4], 0
mov dword [esp], 0x4d4a20
call fcn.0050a5a4
mov edx, dword [esp + 0x34]
mov ebx, dword [edx + 0x20]
test ebx, ebx
jne 0x4d68c2
mov dword [esp], str.attempted_gets_on_binary_channel_where_no_iso8859_1_encoding_available
call fcn.00508428
jmp 0x4d68c2
mov dword [esp], str.Tcl_GetsObj:_gotEOL_reached_with_bufPtrNULL
mov dword [esp + 0x34], edx
call fcn.00508428
mov edx, dword [esp + 0x34]
jmp 0x4d6a2e
mov ebx, dword [esi + 0x4c]
test ebx, ebx
je 0x4d7150
mov ecx, dword [esp + 0x4c]
mov dword [ebx + 4], ecx
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x4d6ed6
nop
mov dword [eax + 4], 0x10
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x4d6ec8
mov ebx, dword [esp + 0x3c]
mov eax, dword [ebx]
call fcn.004d58fc
mov ecx, dword [esp + 0x44]
mov dword [esi + 0xc], ecx
mov ebx, dword [esp + 0x48]
mov dword [esi + 0x10], ebx
mov eax, dword [esp + 0x6c]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004eb04c
or dword [esi + 4], 0x4000
mov ebx, 0xffffffff
jmp 0x4d6ae8
mov edi, dword [esp + 0x88]
xor edx, edx
jmp 0x4d6a26
mov eax, dword [esp + 0x6c]
mov ecx, dword [ebp + 4]
add ecx, eax
cmp edx, ecx
je 0x4d716e
mov edi, dword [esp + 0x88]
mov ebx, edx
xor edx, edx
jmp 0x4d6a26
cmp dword [esp + 0x40], edx
je 0x4d70b4
mov eax, dword [ebp + 4]
mov ebx, edx
sub ebx, eax
mov dword [esp + 0x48], ebx
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0x3c]
mov edx, dword [edx]
mov dword [esp + 0x44], edx
mov edi, dword [esp + 0x88]
mov ebx, dword [edi + 0xc]
test ebx, ebx
je 0x4d70c2
mov dword [esp + 0x40], 0
lea edx, [esp + 0x7c]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x38], ecx
call fcn.004d5648
test eax, eax
mov ecx, dword [esp + 0x38]
jne 0x4d70ad
mov eax, dword [esp + 0x80]
mov ebx, dword [eax]
add ebx, dword [esp + 0x94]
mov edi, dword [esp + 0x40]
test edi, edi
je 0x4d6fbe
xor edx, edx
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx]
call fcn.004d5cec
mov eax, dword [ebp + 4]
mov edi, dword [esp + 0x88]
mov ecx, dword [esp + 0x48]
add ecx, eax
cmp ecx, ebx
jb 0x4d69b9
lea ebx, [ecx - 1]
or dword [esi + 4], 0x1000
mov edx, 1
jmp 0x4d6a26
mov dword [esp + 0x48], eax
mov ecx, eax
cmp dword [esp + 0x3c], ecx
jae 0x4d6d9c
mov eax, dword [esp + 0x3c]
movzx edi, byte [eax]
jmp 0x4d6d7e
mov ebp, dword [esp + 0x50]
sub eax, dword [esp + 0x3c]
mov dword [esp + 0x40], eax
mov ecx, eax
inc eax
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x40]
add eax, dword [esp + 0x74]
mov dword [esp + 4], eax
mov dword [esp], ebp
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], ecx
call fcn.004e8cbc
add eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x38]
mov edi, eax
mov esi, dword [esp + 0x3c]
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x40]
add dword [esp + 0x74], eax
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x44]
add dword [edx + 4], ecx
mov edx, dword [esp + 0x4c]
mov eax, dword [edx]
call fcn.004d58fc
and dword [ebx + 4], 0xfffff7ff
mov ebx, dword [esp + 0x74]
mov eax, dword [esp + 0x4c]
call fcn.004d45b8
jmp 0x4d6af1
mov eax, dword [ebx + 4]
test ah, 8
je 0x4d7092
test al, 8
jne 0x4d721b
and ah, 0xf7
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x4c]
call fcn.004d5174
test eax, eax
jne 0x4d721b
mov edx, dword [ebx + 0x50]
mov eax, dword [edx]
jmp 0x4d6d39
mov ebx, ecx
jmp 0x4d6fa9
mov edi, dword [esp + 0x88]
mov ecx, edx
jmp 0x4d6fd6
mov ebx, dword [edi]
mov edx, ebx
sub edx, dword [edi + 4]
cmp edx, dword [esp + 0x90]
jne 0x4d6f74
cmp ebx, dword [edi + 8]
jl 0x4d71aa
mov edx, dword [esp + 0x44]
test byte [edx + 4], 8
jne 0x4d6f74
mov edx, dword [esp + 0x3c]
mov edx, dword [edx + 8]
mov dword [esp + 0x40], edx
mov edx, dword [edx + 4]
mov dword [esp + 0x4c], edx
cmp edx, 2
je 0x4d71f0
cmp edx, 3
je 0x4d71f0
cmp edx, 4
je 0x4d71f0
cmp edx, 5
je 0x4d71f0
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x40]
test edx, edx
je 0x4d71aa
mov edx, 1
mov eax, dword [esp + 0x44]
mov dword [esp + 0x38], ecx
call fcn.004d5cec
mov ecx, dword [esp + 0x38]
jmp 0x4d6f7c
mov dword [esp], str.Tcl_GetsObj:_restore_reached_with_bufPtrNULL
call fcn.00508428
jmp 0x4d6eb8
mov dword [esp + 0x58], 0x10
jmp 0x4d6cdf
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004eb04c
mov ebx, dword [esp + 0x3c]
mov eax, dword [ebx]
call fcn.004d58fc
mov ebx, 0xffffffff
jmp 0x4d6ae8
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x44], 1
xor ecx, ecx
mov dword [esp + 0x40], 0
jmp 0x4d7019
mov dword [edi + 4], ebx
mov dword [esp + 0x90], 0
mov edx, dword [esp + 0x98]
add dword [esp + 0x9c], edx
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov ebx, ecx
jmp 0x4d6fc8
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x48], ecx
jmp 0x4d6d9c
mov edx, dword [esp + 0x40]
mov edx, dword [edx + 0x2c]
mov dword [esp + 0x40], edx
jmp 0x4d712b
mov ebp, dword [esp + 0x50]
cmp ecx, dword [esp + 0x3c]
je 0x4d7281
sub ecx, dword [esp + 0x3c]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
jmp 0x4d7019
mov ebp, dword [esp + 0x50]
mov esi, dword [ebx + 0x4c]
test esi, esi
jne 0x4d7232
mov dword [esp], str.TclGetsObjBinary:_restore_reached_with_bufPtrNULL
call fcn.00508428
mov edx, dword [esp + 0x58]
mov dword [esi + 4], edx
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4d724e
mov dword [eax + 4], 0x10
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x4d7240
mov ecx, dword [esp + 0x4c]
mov eax, dword [ecx]
call fcn.004d58fc
mov edx, dword [esp + 0x5c]
mov dword [ebx + 0x10], edx
mov edx, dword [esp + 0x54]
mov dword [esp + 4], edx
mov dword [esp], ebp
call fcn.004e8cbc
or dword [ebx + 4], 0x4000
mov ebx, 0xffffffff
jmp 0x4d706e
mov ecx, dword [esp + 0x54]
cmp ecx, dword [esp + 0x74]
je 0x4d72a2
mov dword [esp + 0x44], 0
xor ecx, ecx
mov dword [esp + 0x40], 0
jmp 0x4d7019
mov dword [esp + 4], ecx
mov dword [esp], ebp
call fcn.004e8cbc
mov ebx, dword [esp + 0x4c]
mov eax, dword [ebx]
call fcn.004d58fc
mov ebx, 0xffffffff
jmp 0x4d706e