Function at 0x4d6508
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.004d42ec
test eax, eax
jne 0x4d686c
mov ebx, dword [esi + 8]
test ebx, ebx
je 0x4d6950
mov eax, dword [esi + 0x70]
mov dword [esp + 0x3c], eax
mov edi, dword [esi + 0x4c]
mov eax, dword [ebp + 4]
test eax, eax
je 0x4d6acd
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 0x4d6ac0
mov ecx, dword [edi + 4]
mov dword [esp + 0x4c], ecx
test ebx, ebx
je 0x4d6ae2
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.004d5308
test eax, eax
jne 0x4d6b6d
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x94]
add edx, ecx
test edi, edi
je 0x4d6634
mov eax, ecx
cmp edx, ecx
jbe 0x4d6634
movsx ebx, byte [ecx]
cmp ebx, edi
jne 0x4d662f
jmp 0x4d67c0
movsx ebx, byte [eax]
cmp ebx, edi
je 0x4d67c0
inc eax
cmp edx, eax
jne 0x4d6624
mov eax, dword [esi + 0x1c]
cmp eax, 1
je 0x4d67d2
jae 0x4d6688
mov ebx, ecx
mov eax, dword [esi + 4]
test ah, 0x10
jne 0x4d687c
cmp edx, ebx
ja 0x4d6661
jmp 0x4d6696
cmp al, 0xa
je 0x4d66da
inc ebx
cmp ebx, edx
je 0x4d6696
mov al, byte [ebx]
cmp al, 0xd
jne 0x4d6658
lea ecx, [ebx + 1]
cmp ecx, edx
je 0x4d6bff
mov edi, dword [esp + 0x88]
xor edx, edx
cmp byte [ecx], 0xa
sete dl
inc edx
lea ebx, [ecx - 1]
jmp 0x4d66e6
cmp eax, 2
je 0x4d66c4
cmp eax, 3
je 0x4d67fc
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x4d66af
or ah, 6
mov dword [esi + 4], eax
or dword [esi + 0x10], 2
mov edx, dword [esp + 0x40]
test ah, 2
jne 0x4d6bde
mov dword [esp + 0x70], edx
jmp 0x4d65ec
mov ebx, ecx
cmp ecx, edx
jae 0x4d6696
cmp byte [ecx], 0xa
je 0x4d66da
nop
inc ebx
cmp ebx, edx
je 0x4d6696
cmp byte [ebx], 0xa
jne 0x4d66d0
mov edi, dword [esp + 0x88]
mov edx, 1
test edi, edi
je 0x4d6b54
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.004fb3d4
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.004eb33c
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx]
call fcn.004d55bc
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.004d4278
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 0x4d6640
mov ebx, ecx
cmp ecx, edx
jae 0x4d6696
cmp byte [ecx], 0xd
je 0x4d66da
lea esi, [esi]
inc ebx
cmp ebx, edx
je 0x4d6696
cmp byte [ebx], 0xd
jne 0x4d67e8
jmp 0x4d66da
mov ebx, ecx
cmp ecx, edx
jb 0x4d6811
jmp 0x4d6696
inc ebx
cmp ebx, edx
jae 0x4d6696
cmp byte [ebx], 0xd
jne 0x4d6808
inc ebx
cmp ebx, edx
jb 0x4d6853
cmp ebx, dword [esp + 0x40]
je 0x4d684b
sub ebx, dword [ebp + 4]
mov dword [esp + 0x70], edx
lea edx, [esp + 0x7c]
mov eax, dword [esp + 0x3c]
call fcn.004d5308
test eax, eax
jne 0x4d6b6d
mov edx, dword [esp + 0x70]
add edx, dword [esp + 0x94]
add ebx, dword [ebp + 4]
cmp ebx, edx
jae 0x4d6bd0
cmp byte [ebx], 0xa
jne 0x4d6808
dec ebx
mov edi, dword [esp + 0x88]
mov edx, 2
jmp 0x4d66e6
mov dword [esp + 0x3c], edi
mov ebx, 0xffffffff
jmp 0x4d67a8
and ah, 0xef
mov dword [esi + 4], eax
cmp ecx, edx
jae 0x4d6696
cmp byte [ecx], 0xa
jne 0x4d6661
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.004fb3d4
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 0x4d6650
mov eax, dword [esi + 0x1c]
dec eax
cmp eax, 1
ja 0x4d6541
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.004e8f44
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 0x4d6e21
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 0x4d6d3c
mov ecx, dword [esp + 0x44]
add ecx, dword [edx + 4]
mov dword [edx + 4], ecx
mov eax, dword [edx]
cmp ecx, eax
jl 0x4d69f0
mov edx, dword [edx + 0xc]
test edx, edx
je 0x4d6d3c
mov eax, dword [edx]
cmp eax, 0x10
je 0x4d6d3c
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 0x4d6cb0
cmp dword [esp + 0x3c], ecx
jae 0x4d6a5c
mov eax, dword [esp + 0x3c]
movzx edi, byte [eax]
cmp dword [esp + 0x40], edi
jne 0x4d6a39
jmp 0x4d6ea3
movzx esi, byte [eax]
cmp dword [esp + 0x40], esi
je 0x4d6caa
inc eax
cmp eax, ecx
jne 0x4d6a2c
cmp ebp, edi
je 0x4d6e4f
mov eax, dword [esp + 0x3c]
jmp 0x4d6a57
movzx esi, byte [eax]
cmp esi, ebp
je 0x4d6cc6
inc eax
cmp ecx, eax
ja 0x4d6a4c
mov eax, dword [ebx + 4]
mov esi, dword [esp + 0x48]
test esi, esi
je 0x4d6a71
or ah, 6
mov dword [ebx + 4], eax
or dword [ebx + 0x10], 2
test ah, 2
jne 0x4d6ec0
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.004e8f80
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 0x4d69cb
mov dword [esp + 0x4c], 0x10
jmp 0x4d657a
lea eax, [esp + 0x6c]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004dd4d4
jmp 0x4d655d
mov dword [esp + 4], 0x24
mov dword [esp], 0x67b74c
call fcn.00508278
mov ebx, dword [eax + 0x20]
test ebx, ebx
jne 0x4d6582
mov dword [esp + 4], 0x6091f8
mov dword [esp], 0
mov dword [esp + 0x34], eax
call fcn.004fa710
mov edx, dword [esp + 0x34]
mov dword [edx + 0x20], eax
mov dword [esp + 4], 0
mov dword [esp], 0x4d46e0
call fcn.00509e28
mov edx, dword [esp + 0x34]
mov ebx, dword [edx + 0x20]
test ebx, ebx
jne 0x4d6582
mov dword [esp], str.attempted_gets_on_binary_channel_where_no_iso8859_1_encoding_available
call fcn.00507f04
jmp 0x4d6582
mov dword [esp], str.Tcl_GetsObj:_gotEOL_reached_with_bufPtrNULL
mov dword [esp + 0x34], edx
call fcn.00507f04
mov edx, dword [esp + 0x34]
jmp 0x4d66ee
mov ebx, dword [esi + 0x4c]
test ebx, ebx
je 0x4d6e10
mov ecx, dword [esp + 0x4c]
mov dword [ebx + 4], ecx
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x4d6b96
nop
mov dword [eax + 4], 0x10
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x4d6b88
mov ebx, dword [esp + 0x3c]
mov eax, dword [ebx]
call fcn.004d55bc
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.004eb33c
or dword [esi + 4], 0x4000
mov ebx, 0xffffffff
jmp 0x4d67a8
mov edi, dword [esp + 0x88]
xor edx, edx
jmp 0x4d66e6
mov eax, dword [esp + 0x6c]
mov ecx, dword [ebp + 4]
add ecx, eax
cmp edx, ecx
je 0x4d6e2e
mov edi, dword [esp + 0x88]
mov ebx, edx
xor edx, edx
jmp 0x4d66e6
cmp dword [esp + 0x40], edx
je 0x4d6d74
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 0x4d6d82
mov dword [esp + 0x40], 0
lea edx, [esp + 0x7c]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x38], ecx
call fcn.004d5308
test eax, eax
mov ecx, dword [esp + 0x38]
jne 0x4d6d6d
mov eax, dword [esp + 0x80]
mov ebx, dword [eax]
add ebx, dword [esp + 0x94]
mov edi, dword [esp + 0x40]
test edi, edi
je 0x4d6c7e
xor edx, edx
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx]
call fcn.004d59ac
mov eax, dword [ebp + 4]
mov edi, dword [esp + 0x88]
mov ecx, dword [esp + 0x48]
add ecx, eax
cmp ecx, ebx
jb 0x4d6679
lea ebx, [ecx - 1]
or dword [esi + 4], 0x1000
mov edx, 1
jmp 0x4d66e6
mov dword [esp + 0x48], eax
mov ecx, eax
cmp dword [esp + 0x3c], ecx
jae 0x4d6a5c
mov eax, dword [esp + 0x3c]
movzx edi, byte [eax]
jmp 0x4d6a3e
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.004e8f80
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.004d55bc
and dword [ebx + 4], 0xfffff7ff
mov ebx, dword [esp + 0x74]
mov eax, dword [esp + 0x4c]
call fcn.004d4278
jmp 0x4d67b1
mov eax, dword [ebx + 4]
test ah, 8
je 0x4d6d52
test al, 8
jne 0x4d6edb
and ah, 0xf7
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x4c]
call fcn.004d4e34
test eax, eax
jne 0x4d6edb
mov edx, dword [ebx + 0x50]
mov eax, dword [edx]
jmp 0x4d69f9
mov ebx, ecx
jmp 0x4d6c69
mov edi, dword [esp + 0x88]
mov ecx, edx
jmp 0x4d6c96
mov ebx, dword [edi]
mov edx, ebx
sub edx, dword [edi + 4]
cmp edx, dword [esp + 0x90]
jne 0x4d6c34
cmp ebx, dword [edi + 8]
jl 0x4d6e6a
mov edx, dword [esp + 0x44]
test byte [edx + 4], 8
jne 0x4d6c34
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 0x4d6eb0
cmp edx, 3
je 0x4d6eb0
cmp edx, 4
je 0x4d6eb0
cmp edx, 5
je 0x4d6eb0
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x40]
test edx, edx
je 0x4d6e6a
mov edx, 1
mov eax, dword [esp + 0x44]
mov dword [esp + 0x38], ecx
call fcn.004d59ac
mov ecx, dword [esp + 0x38]
jmp 0x4d6c3c
mov dword [esp], str.Tcl_GetsObj:_restore_reached_with_bufPtrNULL
call fcn.00507f04
jmp 0x4d6b78
mov dword [esp + 0x58], 0x10
jmp 0x4d699f
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004eb33c
mov ebx, dword [esp + 0x3c]
mov eax, dword [ebx]
call fcn.004d55bc
mov ebx, 0xffffffff
jmp 0x4d67a8
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x44], 1
xor ecx, ecx
mov dword [esp + 0x40], 0
jmp 0x4d6cd9
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 0x4d6c88
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x48], ecx
jmp 0x4d6a5c
mov edx, dword [esp + 0x40]
mov edx, dword [edx + 0x2c]
mov dword [esp + 0x40], edx
jmp 0x4d6deb
mov ebp, dword [esp + 0x50]
cmp ecx, dword [esp + 0x3c]
je 0x4d6f41
sub ecx, dword [esp + 0x3c]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
jmp 0x4d6cd9
mov ebp, dword [esp + 0x50]
mov esi, dword [ebx + 0x4c]
test esi, esi
jne 0x4d6ef2
mov dword [esp], str.TclGetsObjBinary:_restore_reached_with_bufPtrNULL
call fcn.00507f04
mov edx, dword [esp + 0x58]
mov dword [esi + 4], edx
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4d6f0e
mov dword [eax + 4], 0x10
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x4d6f00
mov ecx, dword [esp + 0x4c]
mov eax, dword [ecx]
call fcn.004d55bc
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.004e8f80
or dword [ebx + 4], 0x4000
mov ebx, 0xffffffff
jmp 0x4d6d2e
mov ecx, dword [esp + 0x54]
cmp ecx, dword [esp + 0x74]
je 0x4d6f62
mov dword [esp + 0x44], 0
xor ecx, ecx
mov dword [esp + 0x40], 0
jmp 0x4d6cd9
mov dword [esp + 4], ecx
mov dword [esp], ebp
call fcn.004e8f80
mov ebx, dword [esp + 0x4c]
mov eax, dword [ebx]
call fcn.004d55bc
mov ebx, 0xffffffff
jmp 0x4d6d2e